Board index » jbuilder » illegal unicode escape in the comments error

illegal unicode escape in the comments error


2004-01-23 07:06:04 AM
jbuilder20
JBuilder 9 JDK 1.4 compiler complaints about illegal unicode escape characters in the comments and refuses to complile my class!
Example:
/**
* Generated from
* C:\user\TMailServices.exe
*/
Did anyone see it? Is there a workaround?
The worst part is that this code is automatically generated by a third-party program. And even if I fix it, it will put back next time the code generator runs!
Any help is appreciated!
 
 

Re:illegal unicode escape in the comments error

"Andrey Tsetlin" < XXXX@XXXXX.COM >writes:
Quote
* C:\user\TMailServices.exe
The compiler treats \uxxxx as a Unicode escape - this transform
happens before lexical parsing, which is why you e.g. cannot use
\u000a as a substitute for \n in string literals.
The workaround is to use forward slashes instead. Windows APIs support
that as long as the '/' is not the first character.
An alternative is to escape the \ using another \ e.g.
C:\\user\\TMailServices.exe
 

Re:illegal unicode escape in the comments error

Andrey Tsetlin wrote:
Quote
The worst part is that this code is automatically generated by a
third-party program. And even if I fix it, it will put back next
time the code generator runs!
If you can do a post-processing step, then after this tool runs, you can
search for filename patterns in the source (use the appropriate regex
for this) and fix up the "\" to "/".
Or if you can fix the tool (or ask for it to be fixed) to generate
forward-slashes, that would be perfect for you..
 

{smallsort}

Re:illegal unicode escape in the comments error

"Andrey Tsetlin" < XXXX@XXXXX.COM >wrote in message
Quote
* C:\user\TMailServices.exe

Did anyone see it? Is there a workaround?
If you put TMailServices.exe in a directory whose name doesn't start
with 'u' you won't get this error.
--
Gillmer J. Derge (TeamB)