Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why did Java change Japanese native encoding in Leopard? (Radar #5015600)



One of the issues with ShiftJIS was that java would fail to Runtime.exec() a file with japanese characters. There were other issues too. That's why we changed it to UTF-8.

Passing -Dfile.encoding=ShiftJIS should help fix your issue. Is that a reasonable option to deal with your old non-unicode carbon application?

Pratik

On Feb 27, 2008, at 3:41 PM, Michael Good wrote:

Dear list,

After getting some bug reports from Japanese users of our mixed Java /
C++ plug-in for an old non-Unicode Carbon application, I discovered a
reference Radar #5015600 in the Java 10.5 release notes:

"Java 1.5 uses ShiftJIS encoding when the primary language is Japanese

Description:
By default, Java 1.5 would use ShiftJIS encoding when the primary
language is set to Japanese. Now it uses UTF-8.

Resolution:
This problem is now fixed."

Can anyone explain why this was considered a problem that needed to be
fixed? It has broken our application on Leopard.

Why should Java's native encoding be different than the result from
CFStringGetSystemEncoding()? That did not change in Leopard - it still
is kCFStringEncodingMacJapanese on both 10.4.11 and 10.5.2. Shift_JIS
is the Java encoding that is closest to kCFStringEncodingMacJapanese.
UTF-8 is totally different!

Before trying to fix our application to deal with this incompatible
change in Leopard, it would be great to understand the rationale for
the change. At the moment it sure seems like a bug in Leopard rather
than a bug fix.

Thanks for any insight!

Michael
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Why did Java change Japanese native encoding in Leopard? (Radar #5015600) (From: "Michael Good" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.