re:Java and UTF

From: Pierre Lewis (lew@nortel.ca)
Date: Wed Jul 02 1997 - 14:47:00 EDT


In message "re:Java and UTF", 'Erik.Kovach@mailhost.bellhow.com'
writes:

> Java has the power to manipulate the bytes between dozens of encodings
> quite easily (although it took myself and several colleagues a while).
> Try this nifty function. It says "read these bytes as encoding
> <inEnc> and output the bytes in encoding <outEnc>." Encodings can be
> Big5, UTF-8 (the standard one...not the goofy Java one), MacThai, or
> whatever is supported by the JDK.

Proven worng. So it is possible. Good.

Still a bit strange to find UTF-8 (a transform, ie. an algorithm)
besides MacThai (an encoding, ie. a table). But, semantic subtleties
aside, it's there.

In message "Re: MES as an ISO standard?", 'gperkins@netcom.com'
writes (on variable names in Unicode):

> It's not a low priority for Japanese programmers.

Fair 'nuff. So be it.

> Oh, yeah. Input. Okay, here it is in both directions:

Good, so now you may work on the linker :-)!

> TO INPUT UTF-8 TEXT:

> try
> {
>  BufferedReader in = new BufferedReader(
>  new InputStreamReader(
>  new FileInputStream("Sample.sjis"), "UTF8"));

>  inputStr = in.readLine();
> }

Strange. The book I was referring to (Java in a nutshell, 2nd)
doesn't show this last constructor. What JDK is that in? Is the
book already out-of-date (I bought it just 2 days ago).

Thanks to Erik and Glen for the pointers,
Pierre



This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:20:35 EDT