Community
Participate
Working Groups
Build tested: Eclipse 2.0 G/A On Platform : Windows 2000, Japanese edition Eclipse has problems with Japanese characters in some cases. Exporting a file with Japanese characters in its name to a Zip file results in the filename being altered. Exporting the same files to a file system worked without a problem. To see an example of this, look at the attached bitmap (ZipFileVsFileSystem.bmp), it shows the same .java and .class files as they are exported to the file system and to a Zip file. As well, asking Eclipse to create a new Java class that is in Japanese characters causes the file to be created successfully but the class name is not added to the file (see EclipseWithJapaneseChars.bmp).
Still awaiting attachments. For the zip file case, is it only in winzip that the filenames look wrong? If you re-import that zip file back into eclipse, are the names correct? Apparently WinZip is not compatible with java.util.zip in its handling of DBCS characters, which results in the names appearing incorrect when viewed with Winzip. See bug 18648 for more details.
Created attachment 1678 [details] EclipseWithJapaneseChars.bmp
Created attachment 1679 [details] ZipFileVsFileSystem.bmp
Looks like a duplicate of #5301.
The second problem (DBCS class name not appearing in java editor), is probably due to using a font that does not support DBCS characters. By default I believe JFace text uses Courier, which cannot show Japanese characters. To fix, go to Preferences > Workbench > Fonts > Text Font, and click on "Use system font". This will switch to a font for that platform that should support DBCS characters. Please confirm if this was the problem.
Created attachment 1710 [details] Garbled Zip File
The problem is when you export (File -> Export) to zip file, the java files (.java, .class) that name is used double byte characters are garbled in zipped file.
java.util.zip always uses UTF8 encoding, while WinZip uses the detected platform encoding. It is not clear which one is correct. The only spec that I know of for the zip file format (from pkware) does not seem to mention the encoding that is used. In the end, we can only be compatible with one or the other. Our options are: 1) Write our own implementation of java.util.zip to use the platform encoding. We would then work with WinZip but not with any other application that assumes UTF8 encoding (for example any application that uses java.util.zip). I don't know how this would behave on Linux. 2) We leave it as is, and we are not compatible with WinZip in DBCS environments. Our inclination is to go with option 2.
*** Bug 21936 has been marked as a duplicate of this bug. ***
Closing. Not planning to fix this (see above comment for reasons).
*** Bug 57691 has been marked as a duplicate of this bug. ***
See also (registration required): http://developer.java.sun.com/developer/bugParade/bugs/4820807.html