in reply to How to encode special characters like ä,ß,é,... in html unicode codes like ä or ä

From your output of öä, I would assume that you have not told Perl that the data you are reading in is UTF-8 as well. You will need to make sure that Perl knows that the data you are reading in are UTF-8 characters, by using either the parameters for open or by telling your database driver to mark the data as UTF-8.

If all else fails, you can manually mark your data as containing UTF-8 encoded data using Encode::decode($data, 'utf-8'), but I would do that at the source instead of doing it at the end of processing.

  • Comment on Re: How to encode special characters like ä,ß,é,... in html unicode codes like ä or ä
  • Download Code

Replies are listed 'Best First'.
Re^2: How to encode special characters like ä,ß,é,... in html unicode codes like ä or ä
by yeehaw (Initiate) on Oct 11, 2011 at 12:23 UTC
    Thanks, with the Encode::decode($data, 'utf-8'), it works great.