in reply to Unicode and text files

It sounds like what you have there isn't UTF-8, but UTF-16.

--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

Replies are listed 'Best First'.
Re^2: Unicode and text files
by dirtdart (Beadle) on Oct 12, 2006 at 13:49 UTC
    open FILE "<:encoding(utf16)", $myfile while(<FILE>)

    Produces "UTF-16:Unrecognised BOM 4a00 at backup.pl line 68." Line 68 being the while(<FILE>) line. So I'm guessing it's not UTF16.

    The file is produced by NTBackup if that helps any.

      Try utf16le or utf16be

      --
      David Serrano

        WooHoo! utf16le it is!

        Now, is there any way to automagically determine what encoding a file is? Or is that something I'm just going to have to know beforehand?