Hello to all
Before I pull all my hair out... I have a problem with a text string (actually read in from a cell-phone appointment sent to the computer) which has a 'strange' utf-8 encoding.
Let me give an example:
CHARSET=UTF-8:Aftenarr.=20m ed=20Fl.=20Th=C 3=B8gersen
Now I need to convert this into latin.
I tried to replace all the '=' into '\x'. doing this by regex I have to use \\x$1 as a substitute, but then the string is not recognized as utf8.
If I set the string 'manuall' to:
my $str = "Aftenarr.\x20m ed\x20Fl.\x20Th \xC3\xB8gersen" ;
then it works. But of course that's not a solution, as I have to read in a lot of appointments.
Can please somebody give me a hand?
thanks a lot
Thierry
Before I pull all my hair out... I have a problem with a text string (actually read in from a cell-phone appointment sent to the computer) which has a 'strange' utf-8 encoding.
Let me give an example:
CHARSET=UTF-8:Aftenarr.=20m ed=20Fl.=20Th=C 3=B8gersen
Now I need to convert this into latin.
I tried to replace all the '=' into '\x'. doing this by regex I have to use \\x$1 as a substitute, but then the string is not recognized as utf8.
If I set the string 'manuall' to:
my $str = "Aftenarr.\x20m ed\x20Fl.\x20Th \xC3\xB8gersen" ;
then it works. But of course that's not a solution, as I have to read in a lot of appointments.
Can please somebody give me a hand?
thanks a lot
Thierry
Comment