This one time, at band camp, Peter Jeszenszky said:

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

Peter,

Please file this as a bug in Bugzilla (http://bugzilla.exolab.org/). Then
attach your patch to the bug report. Info on creating the patch properly can
be found here: 

    http://www.castor.org/cvs.html#Guidelines-For-Code-Contribution

A test case will need to created for this before it can be committed. If
you're interested, information on the Castor test framework can be found here: 

    http://www.castor.org/test-framework.html

Bruce
-- 
perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to