Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: utf file to ansi, but doesn't work?

by fullermd (Priest)
on Mar 01, 2011 at 08:53 UTC ( #890702=note: print w/replies, xml ) Need Help??


in reply to Re^2: utf file to ansi, but doesn't work?
in thread utf file to ansi, but doesn't work?

Is there a simple way I can check the header (i.e "type") of a file?

There isn't in general any such thing. All there is in a text file is what you see; that's what makes it text. UTF-x files can (and sometimes must) have a BOM, but ISO-8859's won't.

Your text editor either has to be told (by you, by default config, etc) what encoding to use, or it can try (and occasionally even succeed) to guess by the patterns of bytes in it. But it has no way to be know unless you tell it. That's why text encoding is such a mess...

  • Comment on Re^3: utf file to ansi, but doesn't work?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://890702]
help
Chatterbox?
[beech]: checking chatterbox sidebar
[beech]: and again a check on chatterbox sidebar, what is expandability
beech me me me me me me testing chatterbox sidebar
beech my my /me me me me me me me chatterbox sidebar
beech testing chatterbox sidebar
[beech]: and something else

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2017-03-27 22:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (324 votes). Check out past polls.