Bug 20260 - TVT2: corrupted characters in java prefs page
Summary: TVT2: corrupted characters in java prefs page
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: Jared Burns CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 20439 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-06-13 15:14 EDT by Richard Bone CLA
Modified: 2002-07-23 13:39 EDT (History)
3 users (show)

See Also:


Attachments
Corruption in Japanese (15.42 KB, image/gif)
2002-06-14 11:32 EDT, Richard Bone CLA
no flags Details
French screen (14.67 KB, image/gif)
2002-06-14 14:05 EDT, Cam-Thu Le CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Bone CLA 2002-06-13 15:14:56 EDT
Build F2

Preferences>Java
Select Installed JREs
Standard VM(detected) string under Name column is corrupt in all languages.  
National characters are not displayed correctly at all.  japanese reported this 
problem first, but says that most other countries have issues here...

opened in response to TPRS ID=80
Comment 1 Richard Bone CLA 2002-06-13 15:15:27 EDT
adjusted priority to P1
Comment 2 Erich Gamma CLA 2002-06-14 02:52:49 EDT
This dialog is contributed by JDT Debug.
Comment 3 Darin Wright CLA 2002-06-14 09:16:03 EDT
Marking as F4 candidate
Comment 4 Darin Wright CLA 2002-06-14 09:20:24 EDT
Could I get a screen shot showing the "corruption"? Looking at the code, I do 
not see where the problem is.
Comment 5 Darin Wright CLA 2002-06-14 11:31:07 EDT
I have not seen the "corruption" yet, but for ARCH team approval, the 
consequence of not fixing this is that the VM name gets corrupted in 
the "Installed JRE" preference page.
Comment 6 Richard Bone CLA 2002-06-14 11:32:44 EDT
Created attachment 1416 [details]
Corruption in Japanese
Comment 7 Teresa Meriwether CLA 2002-06-14 13:48:23 EDT
If you do not read Japanese, you may not be able to identify from the picture
that the Japanese is corrupted. The English string is "Standard VM (detected)".
The Japanese string is corrupted because the characters are either not Japanese
characters or are legitimate characters but have nothing to do with the word
being translated, and are creating meaningless "words" in Japanese.

In looking through the source files, it appears that the string "Standard VM
(detected)" does not exist as a single string, but rather, as two different
parts. At least, I could not find it as a single string. This is generally
frowned upon for translatable strings, because other languages may need to
change the order of words appearing in a string. When a string is built at
run-time, that process is assigning a word order that is correct in English but
is very likely to be incorrect in other languages. The preferred solution is to
define complete strings for each phrase that will be needed so that each may be
translated correctly.

However, that may not be the problem here. There was something odd about the
string lengths. If you can tell me which key(s) is/are being used to create
"Standard VM (detected)" I might be able to give you more guidance.
Comment 8 Cam-Thu Le CLA 2002-06-14 14:05:09 EDT
Created attachment 1419 [details]
French screen
Comment 9 Cam-Thu Le CLA 2002-06-14 14:08:40 EDT
Sorry, please ignore the French gif. I pasted it for the incorrect bug. 
Comment 10 Darin Wright CLA 2002-06-17 10:53:27 EDT
Released fix candiate fix to HEAD. Changed name of detected VM to "Detected 
VM". No longer performes concatenation of Strings. Changed property file String 
from "(detected)" to "Detected VM". Waiting for F4 approval.
Comment 11 Darin Wright CLA 2002-06-18 14:38:46 EDT
*** Bug 20439 has been marked as a duplicate of this bug. ***
Comment 12 Darin Wright CLA 2002-06-19 13:11:26 EDT
Verified.
Comment 13 Richard Bone CLA 2002-06-26 16:49:42 EDT
This was not fixed.
It looks OK only the first time you launch Workbench.
Once you close and open it again, those strings are
corrupted. 
Comment 14 Jared Burns CLA 2002-06-27 12:02:38 EDT
Verified that the problem exists as described.

We've examined the vmConfiguration file in a binary editor and the bytes 
appear to be getting written correctly. Investigating the possibility that the 
problem may be in reading the file.
Comment 15 Jared Burns CLA 2002-06-27 14:27:16 EDT
We have a fix in hand for this bug.

In JavaRuntime, we weren't calling the InputStreamReader constructor which 
specifies a charset, so we were just getting the "default." The fix is to call 
the constructor that takes a charset and pass in UTF-8.
Comment 16 Darin Swanson CLA 2002-07-01 12:32:15 EDT
Fix has been released in JavaRuntime.  The InputStreamReader created in 
JavaRuntime#loadVMConfiguration(File) is specified to use the "UTF-8" named 
charset.

Please verify.
Comment 17 Jared Burns CLA 2002-07-10 09:48:33 EDT
Verified.
Comment 18 Darin Wright CLA 2002-07-23 13:39:18 EDT
Placed change in 2.0.1 Branch