Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: changing codepage while saving to a text file

by Happy-the-monk (Monsignor)
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


Comment on Re: changing codepage while saving to a text file
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (9)
As of 2014-08-22 21:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (165 votes), past polls