in reply to Re: how do I check encoding before opening FILEHANDLE
in thread how do I check encoding before opening FILEHANDLE
So if you know how the algorithm to figure out the encoding, you can open in byte mode, check the data, and binmode with the appropriate encoding layer.Encode::Guess can be used to guess the actual encoding, but it shouldn't be neccessary (if you're lucky), as the xml file should specify the encoding, as in <?xml version="1.0" encoding="ISO-8859-1"?>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: how do I check encoding before opening FILEHANDLE
by gaal (Parson) on Feb 18, 2005 at 08:41 UTC |