Re: [Phpslash-devel] RE: phpSlash translators
Brought to you by:
joestewart,
nhruby
From: Peter C. <li...@cr...> - 2004-04-20 09:54:02
|
Hi Lukasz and all On Tuesday 20 Apr 2004 12:15 am, Luis M wrote: [...] > >I also have some PHP knowledge - this could be usefull whilst > >solving some problems I've encountered when using ISO 8859- > >2 (Central Europe) encoding in locale files: some polish > >diacritic characters were displayed as entities of ISO 8859-1 > >characters having the same numeric code. For example > >instead of polish "slashed l" character typed in locale file, on > >website appears character encoded as "³" - superscript > >3 ! > > Oh my. I'd say that you don't really need to know php to fix this. It's a > matter of updating the templates slashHead/Foot files that you use and > adding your strings to the locale/xx.php locale file (where xx is the ISO > code for your language). Some of us are working on a Persian version of Back-End right now, and have encountered this problem too (and dealing with bidirectional output!) - so some future version of Back-End will be aware of non-ISO 8859-1 character sets. It's a little more complicated than Luis's answer, I think. There are various string cleaning functions scattered around the PSL engine that convert characters to htmlentities.htmlspecialchars. So you might have to go through the code and use the character set extension that was added in 4.1 ie htmlentities($foo) becomes htmlentities($foo,ENT_NOQUOTES,'ISO-8859-2'); - particularly in pslGetText(). But as Luis implies, most of the difficulties are avoided by adding <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"> To you slashHead(s). Modern browsers then know better how to deal with input and output characters. Also, make sure that Apache has this setting: AddDefaultCharset Off or AddDefaultCharset ISO-8859-2 in the httpd.conf file (not sure if it works for .htaccess) [..] HTH Peter -- The question of whether computers can think is just like the question of whether submarines can swim. -- Edsger W. Dijkstra |