[Cartoweb-users] ISO-8859-2 encoding support

Gambin Dejan Dejan.Gambin at pula.hr
Wed Jul 27 03:25:39 EDT 2005


Hi,

I have successfully made my ISO-8859-2 enabled cartoweb application.
Here I want to describe what I have done and and maybe suggest
something:

As utf8_encode($s)/utf8_decode($s) function is identical to
iconv('iso-8859-1', 'utf8',$s)/iconv('utf8','iso-8859-1',$s) then I have
just created the new EncoderClass named EncoderHR (because with
EncoderISO-8859-2 name didn't work) and used iconv functions to do a
conversion. 

Beside that, since my po/mo files are ISO-8859-2 encoded I had to use
bind_textdomain_codeset function to specify the character encoding in
which the po/mo files are. After that everything seems to work OK. I set
all my EncoderClass to EncoderHR and the text is properly shown.

I was thinking, if the coding is so similar for any encoding, it would
be pretty simple to support any encoding by having the same function(s)
for all the encodings. I suppose only encoding names should be defined a
little differently.

regards

dejan gambin



More information about the Cartoweb-users mailing list