Quote:
Originally Posted by kiwidude
As for having a check for UTF-8 without BOM, I'm not quite sure how feasible that is. From what I know and have googled in the past, it isn't possible to tell from a file what encoding it actually has. You can attempt to open it (like with an xml parser) and see if it errors (like has happened here) but I'm not sure what else you can do to identify it. Perhaps Kovid or someone may have a suggestion...
|
Notepad++ can tell what the encoding is and the source for it is available via Sourceforge if you are interested in having a look at it.