I have finished new Russian translation.
As the 1.4.x branch uses UNICODE I set:
$lang_charset = 'utf-8';
Then I go to Config panel and set
Gallery name and Gallery description
in Russian letters.
Then I swtich to English language and... I see abracadabra in Gallery name and Gallery description.
In config panel option:
Language & Charset settings -> Character encoding is set to Unicode (recommended) (utf-8)
When I look into HTML source when English language selected I see:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
But my browser doesn't set charset correctly... It sets Auto-Select to "Windows-1251" :( :( :(
When I swtich to Russian language and look into HTML source I see the same string:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
But my browser sets Auto-Select of charset correctly to UTF-8 :o
Where is the problem?
I found where was the problem.
In php.ini of the server there was code:
; As of 4.0b4, PHP always outputs a character encoding by default in
; the Content-type: header. To disable sending of the charset, simply
; set it to be empty.
;
; PHP's built-in default is text/html
default_mimetype = "text/html"
default_charset = "windows-1251"
So I just disable sending of the charsert.
As the text says you have to set this line empty:
default_charset = ""
I think this issue can be added to the FAQ.
Thanks.
Best would be to add a line in init.inc.php
header('Content-Type: text/html; charset=utf-8');
This because all browsers, except IE, prefer the header fields instead of the meta tags
That's already been added to 1.4.3, it's in the theme's pageheader() function.
Quote from: Nibbler on December 02, 2005, 08:30:24 PM
That's already been added to 1.4.3, it's in the theme's pageheader() function.
In other words you want to say, that when 1.4.3 will came out there will be no such problem I have with
default_charset = "windows-1251"
?
So even I will have
default_charset = "windows-1251"
in php.ini
1.4.3 will work ok?
The setting you added will just be ignored, it will work fine.