B
Bart Van der Donck
Hello,
I am looking for a way to convert Russian characters to their
(numeric) html entities in a Windows-1252 character set. It looks like
an easy job but it isn't.
I did a search on CPAN and tried a few modules but their output is not
OK for what I want to do. HTML::Entities apparently converts to
non-numeric html entities only. In case of Russian, this module would
not be not suitable.
Unicode::Lite has a strange output (I don't understand it, weird
characters)
I also played around with CGI.pm. It has a short paragraph about this
issue. But I believe this is not the way to go either.
Here some Russian language examples and what they should become.
I post via Google, I am not sure if these characters will get through.
My IE6 is set at utf8 + I see utf8 in my Google-URL above, so I take
my chances.
изменения
should become=
изменения
информация
should become=
информация
Освобождение
should become=
Освобождение
Background:
My application provider did not compile MySQL with support for Russian
characters. (MySQL4) And they are not going to change that. So I am
going to store my Russian data in a webfriendly Windows-1252 charset.
Is this possible? Someone of you perl sultans maybe would have a
one-liner for that?
Thanks,
Bart
I am looking for a way to convert Russian characters to their
(numeric) html entities in a Windows-1252 character set. It looks like
an easy job but it isn't.
I did a search on CPAN and tried a few modules but their output is not
OK for what I want to do. HTML::Entities apparently converts to
non-numeric html entities only. In case of Russian, this module would
not be not suitable.
Unicode::Lite has a strange output (I don't understand it, weird
characters)
I also played around with CGI.pm. It has a short paragraph about this
issue. But I believe this is not the way to go either.
Here some Russian language examples and what they should become.
I post via Google, I am not sure if these characters will get through.
My IE6 is set at utf8 + I see utf8 in my Google-URL above, so I take
my chances.
изменения
should become=
изменения
информация
should become=
информация
Освобождение
should become=
Освобождение
Background:
My application provider did not compile MySQL with support for Russian
characters. (MySQL4) And they are not going to change that. So I am
going to store my Russian data in a webfriendly Windows-1252 charset.
Is this possible? Someone of you perl sultans maybe would have a
one-liner for that?
Thanks,
Bart