Sender: |
|
Subject: |
|
From: |
|
Date: |
Wed, 2 Mar 2011 16:50:50 -0500 |
Content-Type: |
multipart/alternative; boundary=20cf30549e7dfe185a049d86e728 |
MIME-Version: |
1.0 |
Reply-To: |
|
Parts/Attachments: |
|
|
Encoding/decoding of strings was not working correctly with escape
characters for me. I had to change the decoding switch case somewhat because
it was falling into the "unicode sequence" trap for no apparent reason.
The following change was necessary to make this work (but see the warning
below before making this change without checking your own sources):
[Code.java, line 479]
else if (c=='\\') // escape
{
x++;
if ( x >= len )
{ d.type = DecodeReturn.T_ERROR; d.s = "Unterminated
String"; return; }
if (dat.charAt(x)!='u' *&& inUnicode*)
{ d.type = DecodeReturn.T_ERROR; d.s = "Escape
character in Unicode sequence"; return; }
switch (dat.charAt(x))
...
CAVEAT EMPTOR: I am working with significantly altered sources at the
moment, so this may not show up for others the way it has for me. I am
referencing the original source code linenumber above. If you don't use the
"Code" class for this kind of thing, you might want to just ignore this. ;-)
Regards,
Ben S.
|
|
|