This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: about gcj --encoding .


>>>>> ">" == 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]