Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 21454 - Eclipse has problems with Japanese characters in some cases
Summary: Eclipse has problems with Japanese characters in some cases
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 critical (vote)
Target Milestone: ---   Edit
Assignee: DJ Houghton CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 21936 57691 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-07-10 13:15 EDT by Duong Nguyen CLA
Modified: 2004-04-07 13:52 EDT (History)
2 users (show)

See Also:


Attachments
EclipseWithJapaneseChars.bmp (364.39 KB, image/bmp)
2002-07-10 15:51 EDT, Duong Nguyen CLA
no flags Details
ZipFileVsFileSystem.bmp (281.60 KB, image/bmp)
2002-07-10 15:52 EDT, Duong Nguyen CLA
no flags Details
Garbled Zip File (172.33 KB, image/jpeg)
2002-07-18 09:38 EDT, Steve Pequegnat CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Duong Nguyen CLA 2002-07-10 13:15:40 EDT
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).
Comment 1 John Arthorne CLA 2002-07-10 15:07:40 EDT
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.
Comment 2 Duong Nguyen CLA 2002-07-10 15:51:40 EDT
Created attachment 1678 [details]
EclipseWithJapaneseChars.bmp
Comment 3 Duong Nguyen CLA 2002-07-10 15:52:21 EDT
Created attachment 1679 [details]
ZipFileVsFileSystem.bmp
Comment 4 Kevin Haaland CLA 2002-07-12 13:24:13 EDT
Looks like a duplicate of #5301. 
Comment 5 John Arthorne CLA 2002-07-12 14:27:40 EDT
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.
Comment 6 Steve Pequegnat CLA 2002-07-18 09:38:03 EDT
Created attachment 1710 [details]
Garbled Zip File
Comment 7 Steve Pequegnat CLA 2002-07-18 09:38:48 EDT
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.
 
Comment 8 John Arthorne CLA 2002-07-23 10:32:21 EDT
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.
Comment 9 John Arthorne CLA 2002-07-26 10:59:35 EDT
*** Bug 21936 has been marked as a duplicate of this bug. ***
Comment 10 John Arthorne CLA 2002-09-03 16:51:26 EDT
Closing.  Not planning to fix this (see above comment for reasons).
Comment 11 Rafael Chaves CLA 2004-04-07 13:48:59 EDT
*** Bug 57691 has been marked as a duplicate of this bug. ***
Comment 12 Rafael Chaves CLA 2004-04-07 13:52:47 EDT
See also (registration required):

http://developer.java.sun.com/developer/bugParade/bugs/4820807.html