This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: about gcj --encoding .
- From: Tom Tromey <tromey at redhat dot com>
- To: bbskill <bbkills at tom dot com>
- Cc: java at gcc dot gnu dot org
- Date: 08 Aug 2005 13:10:56 -0600
- Subject: Re: about gcj --encoding .
- References: <42F3B4EF.7080506@tom.com>
- Reply-to: tromey at redhat dot com
>>>>> ">" == bbskill <bbkills@tom.com> writes:
>> My locale is GBK;
>> My version of GCJ is 4.1,Compiled following
>> http://gcc.gnu.org/java/build-snapshot.html.
>> I write a simple java file (Test.java the println a string whose
>> encoding is GBK (
>> String str = "XXX",which is directly written in my locale),
>> than I use gcj --encoding=GBK --main=Test Test.java -o Test
>> But the string output is not displayed as I written in the .java. I
>> checked the
>> encoding of string output is UTF-8 .
>> why my --encoding option doesn't work ?
>> Thanks for your any help !
There are a number of possible things that could have gone wrong here.
Let's start at the beginning.
What platform are you on?
What are the actual bytes in the source file?
When you run the program is the current locale's default encoding GBK?
If you compile the program to bytecode, does the string in the
bytecode have the value you would expect? (It will be utf-8 encoded)
Tom