With this various talk about trying to get Shift_JIS to work with (Wi)Tango's XML 
functions, I was wondering: 

Has anyone had any experience trying to get double-byte characters to and from Java 
Beans? 
(Or COM objects for that matter)?

A while back I was working on some Java classes that can be called from (Wi)Tango to 
take care of encoding conversion and double-byte string functions. 
(Stuff like getting the length of a string in characters; Tango2000's <@LENGTH> tag 
just returns the number of bytes.)

I tried to pass shift-jis characters into my Java Bean, but they appeared to get 
broken between Tango and Java.

I couldn't even get them to work on a very simple set->get round-trip, like (from 
memory):

public class myEncodingTest {

   String myString;

   public myEncodingTest() {
   }

   public String setMyString(String s) {
      myString = s;
   }

   public String getMyString() {
      return myString;
   }

}

I was testing this stuff with Tango2000 on a Japanese Windows 98 machine (which was 
all I had with me 'cos I was on vacation...) and I haven't had time to do proper 
testing on other platforms.

I worked around this by using the <@ASCII> tag to get a numerical representation of 
each byte, then pass those to my Java Bean, which seems to work OK, but yuck...

So has anyone else had any experiences (good or bad) getting double-byte characters to 
and from Java Beans?

Or would I have had better luck with COM?

Ed Edgar
Asia Hosting, Tokyo
The Princeton Review
http://www.review.co.jp
[EMAIL PROTECTED]
Tel +81 (0)3 3463 4282
Fax +81 (0)3 3463 2208

________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body

Reply via email to