Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: “ and ” (and friends) in sourcecode

by Errto (Vicar)
on Dec 29, 2005 at 04:44 UTC ( [id://519711]=note: print w/replies, xml ) Need Help??


in reply to “ and ” (and friends) in sourcecode

As mentioned, non-ASCII characters are allowed in source files, but they will be interpreted according to your current locale settings (in Windows terms, the "ANSI codepage"). But copy that file to another machine and who knows what might happen. One safe way to deal with this, as others have mentioned, is to use Unicode escapes for non-ASCII characters. Another is to explicitly set the character encoding for your source file with the encoding pragma. But be aware that this pragma has some caveats so read its documentation carefully.
  • Comment on Re: “ and ” (and friends) in sourcecode

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (8)
As of 2024-04-24 12:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found