Issue Details (XML | Word | Printable)

Key: JAVACC-50
Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: Major Major
Assignee: sriram
Reporter: hfaber
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
javacc

jjtree modifies non-ascii characters to unicode escape sequence \ufffd

Created: 04/Sep/04 08:18 AM   Updated: 02/Sep/08 01:08 AM   Resolved: 02/Sep/08 01:08 AM
Component/s: jjtree
Affects Version/s: current
Fix Version/s: 4.1

Time Tracking:
Not Specified

Environment:

Operating System: Linux
Platform: PC


Issuezilla Id: 50
Tags:
Participants: hfaber, paulcager, sreeni and sriram


 Description  « Hide

When a ISO8859-1 character that is not in the ASCII subset is used in the .jjt
file, this character is changed in the .jj file into the unicode escape sequence
\ufffd, making the language description incorrect.
Example:
In the .jjt file:
TOKEN :
{
<UPPERCASE_LETTER : ["A"-"Z",
"À", "�", "Â", "Ã", "Ä", "Å", "Æ",
"Ç", "È", "É", "Ê", "Ë", "Ì", "�", "Î", "�",
"�", "Ñ", "Ò", "Ó", "Õ", "Ô", "Ö", "Ø",
"Ù", "Ú", "Û", "Ü", "�", "Þ"] >
}

changes to this in the .jj file (which is clearly not the same):
TOKEN :
{
<UPPERCASE_LETTER : ["A"-"Z",
"\ufffd", "\ufffd", "\ufffd", "\ufffd", "\ufffd",
"\ufffd", "\ufffd",
"\ufffd", "\ufffd", "\ufffd", "\ufffd", "\ufffd",
"\ufffd", "\ufffd", "\ufffd", "\ufffd",
"\ufffd", "\ufffd", "\ufffd", "\ufffd", "\ufffd",
"\ufffd", "\ufffd", "\ufffd",
"\ufffd", "\ufffd", "\ufffd", "\ufffd", "\ufffd",
"\ufffd"] >
}



sreeni added a comment - 07/Sep/04 12:31 PM

I am a bit confused. Are you using the non-ASCII characters literally in the
grammar file? If so, that could be an issue because JavaCC does not use the
correct reader with the correct encoding. So I suggest you simply use the \uxxxx
notation for all the non-ASCII chars and see if the problem goes away.

So while this is a bug in general, there might be other issues in your grammar
as well.


sreeni added a comment - 24/Dec/04 10:40 AM

I need more info. I may have corrsponded by email with hfaber, but I don't have
it anymore. So please cotnact me so I can find out some more detail and fix it
for 4.0.


paulcager added a comment - 23/Oct/07 10:42 AM

I've not been able to reproduce this problem. A lot has changed since 2004 - how
do people feel about marking this as resolved,worksforme?


paulcager added a comment - 02/Nov/07 05:42 PM

Hi,

I've not been able to reproduce this bug with the latest version of JavaCC. Is
it OK if we close it? Please reopen it if you feel the problem hasn't been resolved.


paulcager added a comment - 02/Sep/08 12:57 AM

Fixed in 4.1


paulcager added a comment - 02/Sep/08 01:08 AM

Fixed in 4.1