NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use trunk.foswiki.org to view this page for some minimal testing.
Use Item9693 for docu changes for 1.2 and 2.0.

Item8520: localization; bad charset definitions for non english pages (in header and meta)

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Confirmed Engine FoswikiRender, I18N  
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 &#347;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
 

ItemTemplate edit

Summary localization; bad charset definitions for non english pages (in header and meta)
ReportedBy BioSmoothly
Codebase 1.0.9
SVN Range
AppliesTo Engine
Component FoswikiRender, I18N
Priority Normal
CurrentState Confirmed
WaitingFor
Checkins
TargetRelease minor
ReleasedIn 1.2.0
CheckinsOnBranches
trunkCheckins
Release01x01Checkins
Topic attachments
I Attachment Action Size Date Who Comment
bad_charset.htmlhtml bad_charset.html manage 0.4 K 13 Feb 2010 - 12:50 BioSmoothly page with bad charset
good_charset.htmlhtml good_charset.html manage 0.3 K 13 Feb 2010 - 12:50 BioSmoothly page with appropriate charset
Topic revision: r7 - 05 Apr 2012, GeorgeClark
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads