Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: changing codepage while saving to a text file

by Happy-the-monk (Abbot)
on Mar 09, 2006 at 10:58 UTC ( #535370=note: print w/replies, xml ) Need Help??


in reply to changing codepage while saving to a text file

You could use Encode and its friends to change the encoding of your data before writing.

Or you could use the functionality of open that allows you to specify the encoding of your data, as given in the example code open(FH, "<:utf8", "file") (which is for reading - writig will work analogously). I havent used that yet, but it sounds like the right solution.

I don't know about codepages though, I'd suggest you read the Encode documentation on it.

Cheers, Sören

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://535370]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2016-12-10 15:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (164 votes). Check out past polls.