1) resourcebundle :

I can also write a very simple class that reads the text file in utf8
and build a hashtable from it, it will be easyier for me than 
understanding java abstractions...

I also found in http://java.sun.com/javase/6/jcp/mr2/ that java6 adds
utf8 support... not for now

2) search

it fails to find any record :

qr=globalaction.m_manager.createQuery("select u from userinfo u where
u.lastname like '"+catalogchapter+"%' order by lastname");

when catalogchapter is £ I find the record, when it is א or 种 it
returns zero record without any error (result list count=0).

Knut Forkalsrud wrote:
> Riccardo Cohen wrote:
>> what do you suggest for strings localization ? the docs does not tell 
>> how to use xml for resourcebundle... or how to change encoding for text 
>> resource bundle...
> One approach is to use the \u.... codes for any character outside 
> Latin-1 (.... are the hex digits of the code point in the Unicode tables).
> That may make your resource bundle file less than ideal in terms or 
> readability, but you may chose that for robustness.  You may even want 
> to use the \u.... codes for every non-ascii character if you don't want 
> other user's errors to affect you.
> The other approach is to get familiar with the class loading scheme for 
> resource bundles and write your own implementation.  
> <http://java.sun.com/j2se/1.5.0/docs/api/java/util/ResourceBundle.html#getBundle(java.lang.String,%20java.util.Locale,%20java.lang.ClassLoader)>
>> 2) receiving
>> the html page specify charset=UTF-8 in head content, and when typing £ 
>> sign I get C2 A3. I suppose it is utf8 even if not exactly the code you 
>> gave.
> Correct, typo on my part.
>> With that string the search succeed, but with the chinese 
>> character 务 it fails.
> Fails, how?  I believe that is character 0x52a1 
> <http://www.fileformat.info/info/unicode/char/52a1/index.htm>, which 
> should be perfectly representable in Java's 16 bit characters.
>> I added <character-encoding>utf-8</character-encoding> in resin.conf, 
>> and it did some change (before that, the returned search string was not 
>> equal to the sent search string). But the search still fails with 
>> chinese char. Maybe this is an issue with amber/mysql ?
> Possibly.  Hard to say from here.
> -Knut
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest

Très cordialement,

Riccardo Cohen
149 av Général de Gaulle
37230 Fondettes - France
tel : 02-47-49-90-49
fax : 02-47-49-91-49

resin-interest mailing list

Reply via email to