Tags:
internationalization1Add my vote for this tag create new tag
, view all tags
Supporting Bulgarian should be like any other language - Cyrillic definitely works with the KOI8-R character encoding for Russian (see CyrillicSupport), though Bulgarian may use a different character set. See the TWikiInstallationGuide for details.

UTF-8 is not yet recommended as it doesn't work as well in TWiki, but see ProposedUTF8SupportForI18N if you are interested in testing TWikiAlphaReleases that already have reasonable UTF-8 support.

-- RichardDonkin - 17 Feb 2004

The Bulgarian locale is bg_BG.CP1251. Unfortunately, this means that charset in Content-Type will be set to CP1251 too, but this name is not standard IANA charset, it's not even alias. The standard IANA name is windows-1251, so this should be used as charset.

-- OgnyanKulev - 07 Mar 2004

I recently encountered this problem of the locale charset not matching the IANA charset used by the web browser - there are two solutions:

  1. Recommended but more complex option: upgrade to the latest TWikiBetaRelease and configure the new $siteCharsetOverride to windows-1251, overriding the normal locale-derived charset of CP1251. This release also supports UTF-8 URLs, so you no longer have to reconfigure all web browsers when using TWiki pages with Bulgarian names - see EncodeURLsWithUTF8, and note that you would need to install a couple of CPAN modules if you are not using Perl 5.8.
  2. If you don't want to upgrade and don't need UTF-8 URLs: edit the TWiki.pm module in your current installation so that line 410 (the line before reads $siteCharset = $1 if defined $1;) reads:
$siteCharset = 'windows-1251';
This will then be picked up in the HTTP headers as well as the HTML templates (the former overrides the latter, so setting the %CHARSET% variable explicitly would not work.)

Presumably you are on Windows and expecting only Windows users, since even windows-1251 is a Microsoft extended character set that will probably not work so well with Mac, Linux or Unix users - if not, you would do better to use an ISO-8859-* or KOI8-* based charset, which may be more widely supported.

Let me know how you get on! Also, if you have a public TWiki site, it would be interesting to know the URL.

-- RichardDonkin - 09 Mar 2004

I'm using TWikiRelease01Feb2003 and I think the cleanest approach is using the non-standard locale bg_BG.KOI8-R. That's what I'm doing and it seems to work fine.

-- OgnyanKulev - 10 Mar 2004

Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2008-08-25 - TWikiJanitor
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.