in reply to Re^3: unicode strings without decoding or warnings or corruption
in thread unicode strings without decoding or warnings or corruption

OK--you lost me there. Why can't you use decode? Using your first snippet, I got:
#!/usr/bin/perl use strict; use warnings; use Encode; require Encode::Detect; my $data = "Foo \xE2\x80\x94 Bar"; my $utf8 = decode("Detect", $data); binmode STDOUT, ":encoding(UTF-8)"; print $utf8;
What's lame about that?

Replies are listed 'Best First'.
Re^5: unicode strings without decoding or warnings or corruption
by Anonymous Monk on May 14, 2012 at 04:39 UTC

    OK--you lost me there...

    Lost you? Try reading what I posted, stuff like like "large data structure" and "I thought I would have to write something from scratch "