in reply to calling the interpreter from a utf8 script

Well, the shebang line and the "use utf8" line shouldn't actually contain any characters that utf8 will encode differently than ascii will. (This is actually one of the nice things about utf8 encoding... all of the standard 7-bit ascii characters have the exact same single-byte encoding... while other characters have different, and potentially multi-byte, encodings.)

The perl interpretter, much like many other applications, will read, assuming 7-bit ascii or utf8 (it doesn't really matter, if all of the characters fall within the subset that they encode the same way) up to the line that specifies the encoding. The only problem you should have is if you have any non-7-bit-ascii characters before the "use utf8" line.

It may be a pain... but can you look at the first couple lines of your source through a hex-dumper, and see if your "utf-encoded" and non "utf-encoded" source are identical, byte-for-byte, for those first few lines?

Oh, it could also be a version problem. If your perl interpretter is pre-5.6, then I don't think it recognizes (high-bit-set) utf8.


------------
:Wq
Not an editor command: Wq
  • Comment on Re: calling the interpreter from a utf8 script