f.haeder.net

Back with updated instance but wrong UTF?

I have successfully updated my instance to latest code and migrated to new config file. But as you can see, the UTF-8 is broken. What can I set here to fix it? The database says "utf8mb4_general_ci".
develop (x) friendica (x)
UTF8 is fully decoded here as 2 characters and not as a multi-byte. :-(
First of all, the display is different between your own display name and mine. Did you update your display name? Did you re-fetch mine?
No, the database update has changed it. And I have refreshed contact data.
Can you check in src\Database\DBA.php what charset is actually used for the connection?
Tomorrow more, already 04:33 a.m. here. :-/
Sorry, busy and hot day today. Will attempt it this evening. :)
As configured $charset has value utf8mb4.
Do I have to run queries like this to fix it: UPDATE `item-content` SET `body`= REPLACE(`body`,'ö','?');?
Found a better one:
UPDATE
`item-content`

SET
`body` =
CASE
WHEN CONVERT(CAST(CONVERT(`body` USING latin1) AS BINARY) USING utf8) IS NULL THEN `body`
ELSE CONVERT(CAST(CONVERT(`body` USING latin1) AS BINARY) USING utf8)
END;

Source: stackoverflow
Careful with already converted data, like I had with contact table where all converted uni-code characters had been converted to question marks. I then had to re-fetch all these contacts over the "Advanced" tab, still there are some pending. GNUSocial allows me to refresh contacts through scripts. Maybe a good idea for Friendica as well?
While clicking on "re-fetch contact data" in the "Advanced" tab, I get these E_NOTICE with OStatus contacts:

Notice: Undefined index: body in /var/www/../src/Protocol/OStatus.php on line 1163
Notice: Undefined index: title in /var/www/../src/Protocol/OStatus.php on line 1916
Notice: Undefined index: guid in /var/www/../src/Protocol/OStatus.php on line 1925
Notice: Undefined index: tag in /var/www/../src/Model/Item.php on line 2787
Notice: Undefined index: tag in /var/www/../src/Model/Item.php on line 2796
Notice: Undefined index: attach in /var/www/../src/Protocol/OStatus.php on line 1372


Will prepare a PR for them.
Found a parser error in addons:
PHP Parse error: syntax error, unexpected '}', expecting end of file in ./addons/pumpio/pumpio.php on line 228

Parse error: syntax error, unexpected '}', expecting end of file in ./addons/pumpio/pumpio.php on line 228

Errors parsing ./addons/pumpio/pumpio.php
Branch pumpio/import-curly-braces created, PR is on it's way.
More errors while deleting an item:
Notice: Undefined index: remote in /var/www/../include/items.php on line 357
Notice: Undefined index: confirm in /var/www/../include/items.php on line 368
Notice: Undefined index: canceled in /var/www/../include/items.php on line 391

Yes, some of you may say that I can switch off E_NOTICE but that is causing more trouble than solving it. The best practice in my oppinion is, to get to the root of the cause and not supress errors and warnings.

Only a #fixed #bug is a good bug. :-)
Again, some "downtime" (errors) due to updating my develop branch to latest upstream (= main repository) changes.