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

Update functions.inc.php #829

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

F3lisCatus
Copy link

If charset in use is not UTF-8, convert function $out to LANG_CHARSET first

@F3lisCatus
Copy link
Author

See also issue 828: #828

@garvinhicking
Copy link
Member

I believe your problem is that you dont have a iso88591-locale installed on your server, so a UTF-8 locale is used instead...?

@F3lisCatus
Copy link
Author

F3lisCatus commented Mar 16, 2024

That's quite possibly true, but since it is not my server I have absolutely no control over which locales are available... :-/

I'm going to investigate as soon as I have a decent keyboard in front of me. Debugging from a phone is not my favourite thing. ;-)

EDIT:
<?php print_r(shell_exec("locale -a")); ?> list (among others) "de_DE de_DE.iso88591"... I think that's what I wanted to hear? (Didn't know I was allowed to execute stuff like that, I hope they don't allow access more important things!) ;-)

@garvinhicking
Copy link
Member

Here in this file we declare the used locales:

@define('DATE_LOCALES', 'de_DE.ISO-8859-1, de_DE.ISO8859-1, german, de_DE, de_DE@euro, de');

Your locale does not seem listed here; you could try to add it there and if it works we can make a PR for that change instead?

Thanks for helping to improve Serendipity :)

@F3lisCatus
Copy link
Author

The complete list of supported locales is quite extensive, here are the ones for German:

de_DE de_DE.iso88591 de_DE.iso885915@euro de_DE.utf8 de_DE@euro

Seems like my provider omitted the dash between 8859 and 1, could that be the problem?

@garvinhicking
Copy link
Member

Yes it can be dependant on the specific OS and configuration. You should be able to just add the locale to the file and place that I mentioned, add it at the beginning, not the end...?

@F3lisCatus
Copy link
Author

I edited /lang/serendipity_lang_de.inc.php line 9 to read @define('DATE_LOCALES', 'de_DE.iso88591 de_DE.iso885915@euro, de_DE.ISO-8859-1, de_DE.ISO8859-1, german, de_DE, de_DE@euro, de'); and removed my line 162 from functions.inc.php, but does not solve my problem. "März" is back! ;-) I tried some other variations but no luck.

I think I will just keep my patch in the functions.inc.php for now. I guess there is something wrong with my configuration. I always seem to run into localization problems anyways, it's kind of my thing. ;-)

@garvinhicking
Copy link
Member

If you want, let us debug this. I always want to know the root of this 😅
I'll get back to you next week, with a dummy script we should be able to debug this, if you want?

@F3lisCatus
Copy link
Author

Ok, but on weekdays I don't have that much time so beware of my response times. ;-)

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

Successfully merging this pull request may close these issues.

None yet

2 participants