in reply to Re: Reading in utf-8 txt file gives garbled data when printed as part of utf-8 html...
in thread Reading in utf-8 txt file gives garbled data when printed as part of utf-8 html...

Woa! Got it!! Was a stupid error:
open(FILE,"<:utf8", "$file"); binmode(FILE);

Your hint "never set the :raw layer (i.e. use binmode(FILEHANDLE) - without a second argument)" in mind I could spot this double-declaration in my code. The problem is always in front of the screen...
  • Comment on Re^2: Reading in utf-8 txt file gives garbled data when printed as part of utf-8 html...
  • Download Code