Problems with lang coding after upgrade

Found a bug? Tell us!!
Post Reply
SuE
Regular
Posts: 11
Joined: Fri Feb 10, 2006 12:58 pm

Problems with lang coding after upgrade

Post 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/
:cry:

webhoster info says that php is 5.0.5

Can you help me, please?
SuE
Regular
Posts: 11
Joined: Fri Feb 10, 2006 12:58 pm

Post 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 :cry:
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
SuE
Regular
Posts: 11
Joined: Fri Feb 10, 2006 12:58 pm

Post 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

:roll:

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?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
SuE
Regular
Posts: 11
Joined: Fri Feb 10, 2006 12:58 pm

Post 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
Last edited by SuE on Mon Nov 27, 2006 6:29 pm, edited 1 time in total.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
SuE
Regular
Posts: 11
Joined: Fri Feb 10, 2006 12:58 pm

Post 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
SuE
Regular
Posts: 11
Joined: Fri Feb 10, 2006 12:58 pm

Post 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?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
SuE
Regular
Posts: 11
Joined: Fri Feb 10, 2006 12:58 pm

Post 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.
Post Reply