Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: avoid writing 'use utf8' in every script

by Jim (Curate)
on Feb 02, 2014 at 02:13 UTC ( [id://1073017]=note: print w/replies, xml ) Need Help??


in reply to avoid writing 'use utf8' in every script

Use a Unicode byte order mark in your Perl script files instead.

As perldoc utf8 explains…

Because it is not possible to reliably tell UTF-8 from native 8 bit encodings, you need either a Byte Order Mark at the beginning of your source code, or "use utf8;", to instruct perl.

You can't bequeath or inherit Perl's comprehension of a source code file's character encoding to or from another file because the two files might be in two different encodings.

Jim

  • Comment on Re: avoid writing 'use utf8' in every script

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1073017]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-04-26 05:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found