in reply to Module to read - modify - write text files in any unicode encoding
To write a file with a specific encoding, it's enough to do things like this:
(Update: I didn't see you already used that, sorry for the noise.)
Guessing character encodings can be done with Encode::Guess, but it can never be done reliably.
I know of no module that combines encoding guessing with file slurping, so it might be worth the effort. But don't roll any encoding handling code by hand, it's all been done before and properly tested.
See perluniintro, perlunitut and perlunicode for details, I also wrote a short article on the subject.
(Update: Fixed article link, thanks for reporting Rudif.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Module to read - modify - write text files in any unicode encoding
by Rudif (Hermit) on May 20, 2008 at 21:18 UTC |