Re: XML Encoding using JAVA
Tuesday, December 4, 2007 09:02 AM
There is no way, in a general and arbitrary sense, for a program to "know" what the "real" encoding of file is -- a file is just ones and zeros to it, and any representation is just as valid in a case like this. If *you* know what some of the characters are supposed to be, you could create a Reader of some variety using one of the constructor forms that also takes a Charset instance. You could try a few different character sets and see which one gives the right answer. If that doesn't really work, you need to find the author of the file and smack them around a little bit.