Hi Developers,
In my application I have to persist classes with names containing
LATIN2 characters like "Term�k" and "Term�kCsoport".
According to my experience with Castor (although I do not regard
myself as an expert) it supports Unicode except for the case when
Unicode characters appear in OQL queries.
This means that passing OQL queries containig LATIN2 characters to
the database results in an exception like the following:
org.exolab.castor.jdo.oql.InvalidCharException: An invalid character was
found in the query at position 18
The exception is thrown by the Lexer and I see no reason not to
consider it as a bug that must be patched. Fixing the bug needs
little modification of the
org.exolab.castor.jdo.oql.Lexer
class:
The isLetter() method at line 288 should be changed from
private boolean isLetter(char theChar) {
return ( ( theChar >= 'A' && theChar <= 'Z' ) ||
( theChar >= 'a' && theChar <= 'z' ) );
}
to
private boolean isLetter(char theChar) {
return Character.isLetter(theChar);
}
The method isDigit() at line 278 should also be changed from
private boolean isDigit(char theChar) {
return ( theChar >= '0' && theChar <= '9' );
}
to
private boolean isDigit(char theChar) {
return Character.isDigit(theChar);
}
I have been working now with the patched version and it seems
to work fine.
Best regards,
Peter
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev