This is basically a follow-up to my node here
Parsing special chars from a XML file
Just like
jaldhar suggested I tried to use HTML::Entities to overcome my problem.
But I already stumbled into a new one. After parsing the XML file (WITH special characters in it)
I apply the HTML::Entities encode_entities to the desired strings and then save them into a HTML file using HTML::Template.
But instead of getting the right unicode codes I am getting completely different ones.
For example instead of getting (ä) & a u m l ; I get (Ã) & A t i l d e ;
I then tried the following : I made a file and put a some ä chars in there (the char not the unicode).
When I opened that file in perl and printed it to screen I saw the à char.
But when I saved the string back to the file and opened it the chars were correct again (ä)
This leads me to the idea that encode_entities translated à to & A t i l d e ; instead of ä to & a u m l ;
because the internal representation of the char somehow got broken and held à instead of ä.
Any ideas what I could do?
PS : I am on Win32