Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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

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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2016-02-13 03:48 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (417 votes), past polls