..
<snip>
..
Properties draftResources = null;
FileInputStream fileStream = new FileInputStream(filePath);
>>draftResources.load(fileStream);
After executing the above line, my Application crashes with
the following error:
java.lang.IllegalArgumentException: Malformed \uxxxx encoding.
at java.util.Properties.loadConvert(Properties.java:290)
at java.util.Properties.load(Properties.java:239)
at JDraftPropertySet.initDraftResources(JDraftPropertySet.java:683)
at JDraftPropertySet.initProperties(JDraftPropertySet.java:147)
at JDraft.loadJDraftProperties(JDraft.java:1136)
at JDraft.startApplication(JDraft.java:826)
at JDraft.main(JDraft.java:675)
Any idea what the foll means???
java.lang.IllegalArgumentException: Malformed \uxxxx encoding
The file I am trying to load is a Simple ASCII File.
Thanks
Uday
\uxxxx is a unicode character, and \u00xx is the place where the 8 bit ASCII
characters reside. It looks to me like there somewhere in the file is a "\u"
somewhere that isn't followed by the expected four digits, which constitutes
a malformed unicode character. Have a look in the file and see; if there
somewhere in there is, for instance "\uday", make it look like "\\uday"
instead, or it will try to read it as a unicode character.
See the JavaDocs on Properties.load():
"
Within the element string, the ASCII escape sequences \t, \n, \r, \\, \",
\', \ (a backslash and a space), and \\uxxxx are recognized and converted to
single characters.
"
That's the first possibility that pop up in my mind.
Hope that helps.
Fredrik Lännergren