Tags:
create new tag
, view all tags

Bug: ISO Charset is computed wrong from locale

TWiki computes content type charset from site locales, missing an hyphen for iso-8859 charsets.

Test case

In TWiki.cfg, set $siteLocale = "de_DE.ISO8859-15" or to any other ISO8859 locale. TWiki.pm computes $siteCharset from it, in setupLocale(). The result, ISO8859-15, is not a valid charset, according to http://www.iana.org/assignments/character-sets.

Environment

TWiki version: TWikiRelease01Sep2004
TWiki plugins: not relevant
Server OS: not relevant
Web server: not relevant
Perl version: not relevant
Client OS: not relevant
Web Browser: not relevant

-- JoachimSchrod - 09 Apr 2005

Impact and Available Solutions

Follow up

Fix record

Discussion

I uploaded this patch, it is against TWiki.pm $wikiversion '01 Sep 2004 $Rev: 1742 $'.

This is my first patch for TWiki, I hope I used the correct process. (Frankly, your description of `how to submit a patch' is not really clear. wink Contact me if I shall elaborate on my problems.)

Category: TWikiPatches

-- JoachimSchrod - 09 Apr 2005

Thanks for the patch! It is possible to configure TWiki to work around this problem - the $siteCharsetOverride variable in TWiki.cfg was introduced to solve (more or less) this problem, and is a more general solution, but your approach does avoid extra configuration which is nice, and we already do this for other charsets. It would be good to have a list of charsets that work with (1) Perl/Unix locales (2) CPAN:Encode and (3) all browsers...

This issue depends on what charset your browser will accept, so please specify the browser you used that had this issue.

-- RichardDonkin - 14 Apr 2005

The issue was told to me by one of my site users. He didn't answer the question for the problematic browser up to now, so I can not elaborate. (I use Mozilla, and it worked there.) After I received his problem report, I looked up the official charset names at IANA, as linked above, and saw that he was right that iso8859* is not a valid charset description, but iso-8859* is. Then I prepared the patch. Sorry that I cannot be more specific.

-- JoachimSchrod - 25 Apr 2005

 
Topic attachments
I Attachment Action Size Date Who Comment
Unknown file formatpatch TWiki.pm.patch manage 0.4 K 2005-04-09 - 16:39 JoachimSchrod Patch to get correct iso-8859 charset
Topic revision: r3 - 2005-04-25 - JoachimSchrod
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by PerlIdeas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.