Hello Daniel:
Thanks for your reply.
We have embedded bsh in an application and so cannot use the java console.

regards,
Ravi

Daniel Leuck wrote:

Hello Ravi,

 

Its your console.  Use JConsole (which supports direct Unicode input) or eval from a file and use Unicode escape syntax: example for nihongo (using Kanji): \u65e5\u672c\u8a9e

Cheers,

Dan

 

 


From: Ravi Krishnamurthy [mailto:ravik@savvion.com]
Sent: Thursday, September 02, 2004 4:39 AM
To: Daniel Leuck
Cc: beanshell-users@lists.sourceforge.net
Subject: Re: [Beanshell-users] anyting specific needs to be done with utf-8

 

Hello:
Here is the snippet I'm trying to do:

String code = "boolean conn1_pre() { return (value.equals(\"testbsh\"));} conn1_pre()";
Interpreter interpreter = new Interpreter();
interpreter.setStrictJava(true);
interpreter.set("value", "testbsh");
Object obj = interpreter.eval(code);
boolean bool = (new Boolean(obj.toString())).booleanValue();
System.out.println("Result is " + bool);


In the above snippet, if I change the testbsh to a japanese characters (in UTF-8) it always returns false. English characters works fine.

regards,
ravi

Daniel Leuck wrote:

For what exactly are you testing?  Many CJK (Chinese, Japanese, Korean)
characters are shared.  Do you just want to know if the characters are CJK
or are you trying to find characters that are specific to Japanese
(hiragana, katakana, etc.)?
 
-----Original Message-----
From: beanshell-users-admin@lists.sourceforge.net
[mailto:beanshell-users-admin@lists.sourceforge.net] On Behalf Of Ravi
Krishnamurthy
Sent: Thursday, September 02, 2004 12:57 AM
To: beanshell-users@lists.sourceforge.net
Subject: [Beanshell-users] anyting specific needs to be done with utf-8
 
Hello :
I'm trying to evaluate a condition with utf-8 encoding ( japanese) . It 
always returns false for the below statement:
 
variable.equals("japanesecharacters");
 
could some one give some pointers.
 
regards,
ravi
 
 
 
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
Beanshell-users mailing list
Beanshell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/beanshell-users