Reading "special" characters from a file
I have a text file that I have created in Default Unicode font. In this file I have some "special" characters. These are the euro symbol, the British Pound symbol and 1 other character that I don't know the name of but looks like this ?
I have code that is trying to read this file in by creating a BufferedReader from a FileReader which was created on this file. I am getting a
sun.io.MalformedException when reading this file. It apears that the euro sign and these other character I don't know the name of are causing the problem. I know this because if I take them out of the file I don't get the error.
Any idea how I fix this problem ? I have been looking into UTF-8 and UTF-16 encoding but can't quite seem to figure it out.....
Thanks in Advance
[790 byte] By [
franoa] at [2007-11-27 2:20:38]

When you have a text file, it has an "encoding" - assignment of bits to characters. You need to figure out what kind of an encoding is in the file you are trying to read, and instantiate a reader that handles that encoding. The readers will generally take a string like "UTF-8" or UTF-16", or whatever.
Thanks for the input.... I did not have my file encoded for UTF-8. I was only changing the font (live and learn).... Once I got the file encoded to UTF-8 I discovered that the editor I was using (Visual SlickEdit) or the version of the editor does not contain a font that contains the Euro symbol in it... (at least not that I could find)... So I switched to Microsoft Word and encoded my file and chose the Courier New font, inserted the unique symbols I needed and it worked....