Re: Reg. Non-English string literal in Java code
"David Lee" <[email protected]> Thu, 10 Nov 2011 08:10:53 -0500
| Newsgroups | gmane.comp.java.beanshell.user |
|---|---|
| Message-ID | <[email protected]> |
Are you sure this is beanshell not javac which is corrupting things ? Take beanshell out and print your array to see. #1 guess is that when you save the file its not saving it in a unicode (UTF8 or UTF16) representation so when javac comes along the data is already corrupted. You can use unicode escapes to solve this "\uXXXX\uXXXX ..." And possibly (not tested) is to use the system property file.encoding to make sure you file matches javac's expectation. But you also need a text editor which stores in a known encoding. ---------------------------------------- David A. Lee [email protected] http://www.xmlsh.org -----Original Message----- From: Rathna Kumar [mailto:[email protected]] Sent: Thursday, November 10, 2011 6:31 AM To: beanshell-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Subject: [Beanshell-users] Reg. Non-English string literal in Java code Hi, I am using bean shell interpreter to execute Java code. If any string literal in Java code has non-English characters (say, Russian) then such characters becomes garbled when the interpreter is executing the code. Is there a way to support internationalization during bean shell interpreter execution of Java code ? Usage of bean shell interpreter Interpreter interpreter = new Interpreter(); interpreter.eval(javaCode); Content of javaCode ArrayList aList = new ArrayList(); aList.add("<RussianCharsHere>"); aList.add("<RussianCharsHere>"); Any help is appreciated. Thanks Rathna Kumar R ---------------------------------------------------------------------------- -- RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Beanshell-users mailing list Beanshell-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/beanshell-users ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1