RE: Problems converting from UTF-8 to UCS-2 and vice-versa using JRun 3.1, SQL Server 2000, Windows 2000 and Java 3.1

From: Addison Phillips [wM] (aphillips@webmethods.com)
Date: Thu Sep 12 2002 - 12:36:08 EDT


How about:

  String myString = null;
  if (newQfLibelleArray[i] instanceof String) {
     myString = newQfLibelleArray[i];
  } else { // every class has a toString method, the result of
           // which may not be very useful...
     myString = newQfLibelleArray[i].toString();
  }

Best Regards,

Addison

> -----Original Message-----
> From: unicode-bounce@unicode.org [mailto:unicode-bounce@unicode.org]On
> Behalf Of Marco Cimarosti
> Sent: Thursday, September 12, 2002 5:12 AM
> To: 'pr1@club-internet.fr'; 'unicode@unicode.org'
> Subject: RE: Problems converting from UTF-8 to UCS-2 and vice-versa
> using JRun 3.1, SQL Server 2000, Windows 2000 and Java 3.1
>
>
> I (Marco Cimarosti wrote):
> > [...] doesn't (newQfLibelleArray[i]) have a method to
> > return a <String> object directly?
>
> Perhaps I have been clumsy. By "returning a <String> object directly" I
> meant, can't you so something like this:
>
> String tempUtf16 = new String( (newQfLibelleArray[i]) );
>
> Or perhaps:
>
> String tempUtf16 = new String( (newQfLibelleArray[i]).getString() );
> String tempUtf16 = new String( (newQfLibelleArray[i]).getText() );
> String tempUtf16 = new String( (newQfLibelleArray[i]).String() );
> String tempUtf16 = new String( (newQfLibelleArray[i]).Text() );
>
> Or whatever the actual method's name is.
>
> _ Marco
>
>



This archive was generated by hypermail 2.1.2 : Thu Sep 12 2002 - 13:22:43 EDT