SHIFT_JIS encoding option problem

Katsuaki.Sugiyama Katsuaki.Sugiyama@jp.yokogawa.com
Mon Feb 17 15:02:00 GMT 2003


On 14 Feb 2003 15:07:47 -0700
"Tom Tromey" <tromey@redhat.com> wrote:
> >>>>> ">" == <Katsuaki.Sugiyama@jp.yokogawa.com> writes:
>> >> class A {
> >> public static void main(String[] a){
> >> System.out.println("\"hello\"");
> >> }
> >> }
>> You didn't say what system you are using. The --encoding option is
> very sensitive to the system, since not all iconv implementations are
> equal. I'll assume you're using Linux.

That target was RedHat-7.3(glibc-2.2.5).
>> I tried compiling this with `--encoding=SJIS'. Sure enough, I saw an
> error.
>> I'm not convinced this is a gcj bug, however.
> Try this:
>> iconv --from-code=SJIS --to-code=UTF-8 A.java
>> When I do this I see that the `\' has been transformed into a yen
> symbol.

My system was dumped broken charactor,too.
>> Either the bytes in this file don't mean what you think (i.e., that
> `\' is really a yen symbol in SJIS, and you need to have different
> bits for gcj to see it as a backslash), or there is a bug in the glibc
> iconv. I suspect the former; ISTR hearing about the backslash-vs-yen
> symbol problem elsewhere.
>> In either case I don't see what we could do about it in gcj. We're at
> the mercy of the system iconv here.
>> Tom

thanks, I'll look over glibc.
Katsuaki


More information about the Java mailing list

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