in reply to Re^2: utf file to ansi, but doesn't work?
in thread utf file to ansi, but doesn't work?
Hi, I don't have a hex editor ;)
Then get one. No excuses.
Is there a simple way I can check the header (i.e "type") of a file? Kinda like you can do with finding file types in images by opening them in Notepad, and then looking for stuff like "gif" etc)
No. You suspect the automatic recognition of the encoding to be a problem, so you shouldn't trust it to diagnose your problem for you.
It wouldn't be something related to the way perl invokes this would it?
Well, you don't check if the command succeeds, that would be a first step. The documentation tells you how (though autodie is more convenient, if you ask me).
Update: Since your files seem to be XML files: those usually begin with something like <?xml version="1.0" encoding="windows-1252"?>. If the encoding still says UTF-8 or is missing (it defaults to UTF-8), you need to adjust that so that XML processors later on will not complain.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: utf file to ansi, but doesn't work?
by ultranerds (Hermit) on Feb 28, 2011 at 13:27 UTC |