http://qs1969.pair.com?node_id=830443


in reply to Re: Why does perl's internal utf8 seem to allow single-byte latin1?
in thread Why does perl's internal utf8 seem to allow single-byte latin1?

The given output was from perl v5.10.0, from Debian stable. I see the flaw in print_chrcode, and have added 'use bytes' to get it to display the true internal format (matching Devel::Peek). Using "export PERL_UNICODE=SAD" or "export PERL_UNICODE=IE" switches the behavior of the script.
  • Comment on Re^2: Why does perl's internal utf8 seem to allow single-byte latin1?

Replies are listed 'Best First'.
Re^3: Why does perl's internal utf8 seem to allow single-byte latin1?
by ikegami (Patriarch) on Mar 24, 2010 at 05:08 UTC
    oh, your source file is encoded using UTF-8 despite the no utf8;.
Re^3: Why does perl's internal utf8 seem to allow single-byte latin1?
by ikegami (Patriarch) on Mar 24, 2010 at 05:15 UTC

    Using "export PERL_UNICODE=SAD" or "export PERL_UNICODE=IE" switches the behavior of the script.

    Not they don't. You don't use @ARGV, you don't use STD* for anything but 7-bit chars, and you don't open any file handles. They have no effect whatsoever.

    Again, what are you trying to do? Whatever it is, you seem to be taking the worst possible approach.