String(strBytes, "UTF-16LE"); thorws java.io.UnsupportedEncodingException

Andreas Grunewald gruni.ca@gmail.com
Tue Apr 19 21:12:00 GMT 2005


Ok I accidently sent my last reply only to Tom, sorry for that.
So here my reply to the mailinglist.
> Yeah, we don't have built-in support for this encoding, as far as I
> can see. On Linux (and Solaris, I suppose) systems we rely on iconv
> for most encoding support.

But why does the Charset Class return that UTF-16LE is supported ?
And why is there
gnu.gcj.convert.Output_UnicodeLittleUnmarked but no
gnu.gcj.convert.Output_UnicodeLittle
and there is a Input_UnicodeLittle what is the difference ? Except the
input and output :-)
>> It looks like there will be some changes in this area in the future
> (4.1 if all goes well), but of course that doesn't help you now...

right.
 
> One option might be to get GNU libiconv, install it, and then rebuild
> a gcj configured to use it. I've never tried this, so I can't say if
> there are any gotchas.

Well I think that goes far beyond what I am able to do, timewise and skillwise.
> Another option would be to write the converter support you need.
> This isn't hard to do.

Uhm so if it's "not hard" how do I do it. I just want to note I'm a
java developer and not very skilled in C/C++.
 
> A third option would be to write a converter that uses whatever
> charset conversion facilities Windows provides, just like we do for
> the iconv converter.

Ok all right, so after a good nights sleep and some thnking I came to
some Ideas, but could need some help in where to find the
documentation to continue.
So here is my Idea, please tell me if I am totaly wrong.
As I can make a static import of 
gnu.gcj.convert.Input_UnicodeLittle i_UL = new
gnu.gcj.convert.Input_UnicodeLittle();
I had the Idea of writing the neccecary 
gnu.gcj.convert.Output_UnicodeLittle i_UL = new
gnu.gcj.convert.Output_UnicodeLittle();
as far as I can see it things seem to me like I could write this as a
java class which culd be compiled and used. This seems feasible if
it's really what I need to do.
The Point where I would need help is what is the Interface that has to
be implemented by Output_UnicodeLittle where can I find Informations
about how to write a new CharsetConverter. I might be able to inherit
some of the JDK functionality by using the Original Sun UTF-16LE
classes but first I would need to know how to proceed.
Regards,
Andreas


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /