Display character encoding
I've been fiddling with this for a while now and can only find out how to convert / change character encoding.
I want to write something super small that will just display the character encoding of a file i specify.
Can somebody give me some guidance of where to start?
If you are talking about HTML/XHTML files, the encoding is given by the specific meta tag written in the HEAD section:
I don't understand your aim, however...
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
What I actually wanted to do was write a small function that could browse for a file and tell you the encoding that was currently on it.
Originally Posted by Kor
At work I have to sometimes check the file encoding of files because scripts require them to be a certain one.
Is that clearer?
And even so, you can detect the encoding of a certain string there, not exactly how the whole document was encoded for...
Thanks a lot.
I'll give PHP a go
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)