Item8520: localization; bad charset definitions for non english pages (in header and meta)
Priority: Normal
Current State: Closed
Released In: 2.0.0
Target Release: major
Hi, I am working on bilingual site (english and polish).I set charset to iso-8859-2 on sites with the polish language. Everything works fine when tested on Opera or Google Chrome. However on Firefox the header is not recognized properly. Firefox recognizes such html page as encoded with iso-8859-1. I don't have IE so I was unable to test on it.
I compared the foswiki page header with recommended header for iso8859-2 and found the diffrences causing errors
I attached two files with good and bad charset definitions in header and meta
Regards, Arek
--
BioSmoothly - 13 Feb 2010
The server won't serve attached HTML documents to avoid some spam, but the files contain:
Good HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl"><head>
<title> good charset</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-2" />
<body>
witaj świecie (Hello world)
</body>
</html>
Bad HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl_PL" lang="pl_PL"><head>
<title> good charset</title>
<meta http-equiv="Content-Type" content="text/html; charset=pl_PL.ISO-8859-2" />
<body>
witaj ¶wiecie (Hello world)
</body>
</html>
--
GeorgeClark - 16 Mar 2011
According to
RFC3066, I'm hoping simply changing the underscore to a dash (pl_PL to pl-PL) will fix the lang attribute (the first 'pl' before the dash is the "primary language subtag", the rest is optional for the client). Or at least, that's my reading of it.
--
PaulHarvey - 16 Mar 2011
I've had to chicken-out of this. The change is trivial but I lack the time to test properly.
--
PaulHarvey - 01 May 2011
Deferring to 1.1.5. This needs someone with
I18N experience to test.
--
GeorgeClark - 13 Dec 2011
Deferring again, to 1.2.
--
GeorgeClark - 05 Apr 2012
Deferring to 1.2.1. Needs an
I18N developer.
The LANG attribute was fixed in
Item12482. The charset is fine since 1.2.0 beta 2 (unicode)
--
Main.CrawfordCurrie - 25 Jun 2015 - 05:59