Page 1 of 1
Problems with lang coding after upgrade
Posted: Fri Nov 24, 2006 7:25 pm
by SuE
HI, I started translating czech lang file and to be able to see the strings "in action", I created a testing serendipity blog. First, I installed 1.0, and all was OK. Then I upgraded to 1.1 and suddenly warnings appeared about wrong coding windows-1250 ( I use this)
http://pokusy.hellgate.cz/
webhoster info says that php is 5.0.5
Can you help me, please?
Posted: Sat Nov 25, 2006 2:50 pm
by SuE
I tried to localize the error:
I replaced the lang.inc.php with the older 1.0 version and it worked well - no errors.
May be the "enc" parameter in the new version? .. this is beyond my knowledge, sry

Posted: Sun Nov 26, 2006 1:40 am
by garvinhicking
Hi!
Your server has the 'mbstring' extension compiled in, but does not support all charsets like the 'windows-1250'. So 'windows-1250' seems to be enabled in the language file for czech but is not available for PHP.
I don'T know much about those codepages. Can you tell me or find out if your language can be displayed with windows-1251?
http://de2.php.net/mbstring Lists that charset as avialable, but not 1250.
Regards,
Garvin
Posted: Sun Nov 26, 2006 2:43 pm
by SuE
this is from phpinfo (current php version is 5.1.6-0.dotdeb.2)
mbstring.detect_order no value no value
mbstring.encoding_translation Off Off
mbstring.func_overload 0 0
mbstring.http_input pass pass
mbstring.http_output pass pass
mbstring.internal_encoding no value no value
mbstring.language neutral neutral
mbstring.strict_detection Off Off
mbstring.substitute_character No value no value
CP1251 would not work for czech chars, I am afraid
Just a question - what if I return to lang.inc.php from serendipity 1.0 - what would be affected?
Posted: Sun Nov 26, 2006 3:13 pm
by garvinhicking
Hi!
CP1251 would not work for czech chars, I am afraid
Hm, do you know which of the given charsets on that PHP-Site would work for czech? If there's none, I'd suggest you to use the UTF-8 charset in serendipity configuration?
Just a question - what if I return to lang.inc.php from serendipity 1.0 - what would be affected?
Which file exactly do you copy so that it works again? Usually you should not use old language files because some strings would be missing?!
Best regards,
Garvin
Posted: Sun Nov 26, 2006 4:35 pm
by SuE
Hi, I already have blog in win-1250 elsewhere. I am afrad it is not so easy to convert it to UTF-8 and therefore, I used win-1250 for the test as well.
I did not replaced lang files but the program file /include/lang.inc.php
edit: typo errs
Posted: Mon Nov 27, 2006 9:58 am
by garvinhicking
Hi!
Hm, that's quite strange that replacing the lang.inc.php file with the old one works. You use the lang.inc.php from Serendipity 1.0, or from which version exactly? Then I could have a look at them to see which difference in the file(s) make it work?
Best regards,
Garvin
Posted: Mon Nov 27, 2006 6:28 pm
by SuE
yes, it was file from serendipity 1.0 because it worked well before I upgraded to 1.1
I uploaded it here (and renamed to .txt):
http://pokusy.hellgate.cz/include/lang.inc.php.txt
Posted: Fri Dec 08, 2006 10:32 pm
by SuE
hi, you were right with the win-1251 coding ,
I found this notice here:
http://cz.php.net/manual/cs/function.mb ... t-case.php
so I replaced LANG-CHARSET with "windows-1251" in the lang.inc. php and it works. Maybe something like this: if lang-charset = win1250 then put win1251 for mb_xxx would do the job?
Posted: Mon Dec 11, 2006 10:13 am
by garvinhicking
Hi!
If we replace the LANG_CHARSET, is it still required to put "win1251" for the mb_conversion? Or will windows-1251 work then?
I'm not sure what exactly needs changing?
Best regards,
Garvin
Posted: Mon Dec 11, 2006 5:06 pm
by SuE
I replaced it only for mb_function - for this one line only.
Generally, I am not sure but I think that win-1251 and win-1250 are not replaceable. Anyway, I am not coder just user.
I will ask at czech web forum.