Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Charset problems #53

Open
tbsmark86 opened this issue Mar 16, 2021 · 1 comment
Open

Charset problems #53

tbsmark86 opened this issue Mar 16, 2021 · 1 comment

Comments

@tbsmark86
Copy link

My config is set to utf8 as suggested; however suddenly all my old images had broken chars in titles while new images where valid.
Turns out that the default charset of my mariadb server changed due to configuration changes (Debian server use utf8mb4 as default instead of latin1)

So the Bug seems to be that the config-setting is never used in the actual database-connection. Of course the charset config is only available after connecting to the DB so this is a kind of chicken-egg problem.

I suggest two things:
a) in inc/config.inc.example add a line:
$CONFIG['dbcharset'] = 'utf8mb4'; // UTF8 suggested
b) In the admin.php add some Note that you should also change edit the config.inc.php

However after fixing this ... I now can't store Emoji and such in the DB because the table was created with the default collate (latin1 at that time). So to really fix this also the schema would need to specify the collate;
Seems to be complicated :/

So I'am now in encoding hell like explained in this article

@tbsmark86
Copy link
Author

tbsmark86 commented Mar 16, 2021

Another effect of the invalid collate is that searching for non-english characters is always case-sensitive.

For my DB i've manually fixed it for the relevant tables and fields with:

ALTER TABLE cpg_pictures CONVERT TO CHARACTER SET 'utf8mb4';
And the method suggested here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant