It works fine for me with statically encoded russian text and passed in as a 
parameter. 

      String name = "XXX"; // some russian text

      log.debug("avoka: " + home.findByName(name));
      log.debug("avoka: " + home.select("SELECT OBJECT(o) FROM A AS o WHERE 
o.name=?1", new Object[]{name}));

// for dynamic case you need to decode it from the source encoding to the JVM default 
one
      name = new String(name.getBytes("windows-1251"), "ISO-8859-1");
      log.debug("avoka: " + home.select("SELECT OBJECT(o) FROM A AS o WHERE o.name='" 
+ name + "'", null));

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Milen Dyankov
> Sent: Tuesday, January 27, 2004 6:25 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-user] Problem when query contains 
> international characters
> 
> People please, is my question too complicated or too stupid ??
> 
> I think I may be narrowed down it to this:
> 
> Somewhere in generated from "JBossQLParser.jjt" and/or 
> "EJBQLParser.jjt" 
> files,
> my string "ąężźćśłóń" =  [261,281,380,378,263,347,322,243,324]
> changes like it was converted to UTF-16 - 
> [1,5,1,25,1,124,1,122,1,7,1,91,1,66,?,243,1,68]
> and then the odd bites were trimmed out 
> [5,25,124,122,7,91,66,243,68] = "|z [BóD"
> 
> Anyone ever experienced a problem like this before?
> Have someone ever managed to make JBoss-Tomcat-Struts 
> application to find entities using characters outside of the 
> Latin1 scope?
> What character encoding you have used? Is UTF-8 not 
> recommended for some reason?
> 
> Please, any hint will be highly appreciated!
> 
> Milen Dyankov
> 
> 
> 
> 
> 
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004 Premiere 
> Conference on Open Tools Development and Integration See the 
> breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to