This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 11862 - i18n - Multi-byte strings set in Component Inspector are displayed in Unicode Escapes in Source Editor
Summary: i18n - Multi-byte strings set in Component Inspector are displayed in Unicode...
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: Sun Solaris
: P2 blocker (vote)
Assignee: David Strupl
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2001-05-01 13:09 UTC by akiko.mochizuki
Modified: 2008-12-22 22:25 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Component Inspector replaced in Japanese text (10.33 KB, image/gif)
2001-07-20 20:35 UTC, akiko.mochizuki
Details
Form Editor displayed Japanese "New Time" label. (4.64 KB, image/gif)
2001-07-20 20:35 UTC, akiko.mochizuki
Details
Source Editor displayed Japanese "New Time" label in Unicode Escapes. (19.96 KB, image/gif)
2001-07-20 20:35 UTC, akiko.mochizuki
Details
Japanese jlblNewTime variable on Source Editor. (19.12 KB, image/gif)
2001-07-20 20:35 UTC, akiko.mochizuki
Details
Japanese timeFormat input on Source Editor. (22.44 KB, image/gif)
2001-07-20 20:35 UTC, akiko.mochizuki
Details
Result of Japanese timeFormat. (4.10 KB, image/gif)
2001-07-20 20:35 UTC, akiko.mochizuki
Details
See the lien 80 in Source Editor. (20.31 KB, image/gif)
2001-07-20 20:35 UTC, akiko.mochizuki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description akiko.mochizuki 2001-05-01 13:09:51 UTC
How to reproduce
----------------
1. Open <home>/ffjuser30/sampledir/examples/clock/ClockFrame. 
2. Opened Component Inspector, Form Editor and Source Editor.
3. Transfer the text "New Time" of jlblNewTime component in 
   Component Inspector to Japanese. See attached gif file.
4. Displayed the Japanese text on Form Editor correctly. 
   See attached gif file.
5. Displayed the text in Unicode Escapes as in the line 73: 
       jlblNewTime.setText("\u65b0\u3057\u3044\u6642\u523b");
   See attached gif file.

The area about the line 73 is un-editable. 
The editable area on Source Editor can be input Japanese.
Comment 1 akiko.mochizuki 2001-05-01 13:11:52 UTC
Created attachment 1283 [details]
Component Inspector replaced in Japanese text
Comment 2 akiko.mochizuki 2001-05-01 13:12:37 UTC
Created attachment 1284 [details]
Form Editor displayed Japanese "New Time" label.
Comment 3 akiko.mochizuki 2001-05-01 13:13:25 UTC
Created attachment 1285 [details]
Source Editor displayed Japanese "New Time" label in Unicode Escapes.
Comment 4 Miloslav Metelka 2001-05-02 11:41:44 UTC
I think that it is the intended behavior in order to get rid of the case when
the source would be saved using chartobyte converter not supporting the original
charset.
I'm reassigning to core because the StringEditor that does the translation to
escape sequences is maintained by core team.

The initComponents() body is un-editable intentionally. It's called a guarded
section and it's designated by the blue background.
Comment 5 Jesse Glick 2001-05-02 16:49:47 UTC
Personally I consider this a feature, not a bug. Storing anything non-ASCII in
the source file is potentially unsafe. Keeping it as Unicode escapes in the
.java is the best way to go, I think.

Ideally I guess the editor's kit would automatically translate the escapes to
Unicode when reading and vice-versa so that you could work comfortably in your
native language in the source window, but still safely store the result on disk.
Wasn't this the idea behind non-lexical \uXXXX escapes in the first place? If
you wish to work on the source outside NetBeans in an editor supporting your
character set but not Unicode escapes, use ascii2native and then native2ascii
again. Similarly for escapes in .properties files.
Comment 6 Jan Chalupa 2001-05-05 20:27:09 UTC
Target milestone -> 3.3
Comment 7 akiko.mochizuki 2001-05-08 03:31:51 UTC
I think this is a bug because a multi-byte string can be displayed 
correctly in other portion. 

1. A variable name can be display in multi-byte characters correctly. 
   Please see the attached jlblNewTime.gif. Check Japanese jlblNewTime 
   variables on the line 73 - 75. 

2. The user can input some multi-byte characters in non-guarded 
   section correctly and the program can be worked well. 
   Please see the attached timeFormat.gif. Check timeFormat variable 
   on the line 164. And see the attached timer.gif, which is the 
   execution of the code. 

If this is a feature and not a bug, this should be improved to be able 
to display multi-byte characters on Source Editor. Many Japanese 
developer have to use Japanese strings in their source code due to 
the specification of the solution they depelop. That they can't 
confirm their code visually is not a user friendly and not convenient. 
Of course other Japanese edition of the IDE solution like MS Visual 
Basic can be realized this feature. So, please fix as soon as possible. 
Comment 8 akiko.mochizuki 2001-05-08 03:33:50 UTC
Created attachment 1320 [details]
Japanese jlblNewTime variable on Source Editor.
Comment 9 akiko.mochizuki 2001-05-08 03:35:26 UTC
Created attachment 1321 [details]
Japanese timeFormat input on Source Editor.
Comment 10 akiko.mochizuki 2001-05-08 03:36:39 UTC
Created attachment 1322 [details]
Result of Japanese timeFormat.
Comment 11 David Strupl 2001-06-21 14:03:43 UTC
Fixed in [dev]. StringEditor 1.12. Please verify. Target Milestone is NB3.3.
Comment 12 Jan Zajicek 2001-06-22 13:30:51 UTC
Akiko, can you please verify this fix, thanks?
Comment 13 akiko.mochizuki 2001-06-24 08:50:04 UTC
Not fixed yet on Build 010619. 
Please see the line 80. Japanese string can't be displayed correctly.
Comment 14 akiko.mochizuki 2001-06-24 08:51:23 UTC
Created attachment 1709 [details]
See the lien 80 in Source Editor.
Comment 15 David Strupl 2001-06-29 09:32:26 UTC
For the fix to take effect you have to run the IDE with
-Dnetbeans.stringEditor.useRawCharacters=true command line switch. The
switch can be specified also in the launcher script or in configuration
file (ide.cfg). I hope that this is ok.
Comment 16 Jiri Skrivanek 2001-07-19 09:34:10 UTC
Verified in build 010714EE_JA on Japanese locale.
The correct command line parameter is:

runide.sh -J-Dnetbeans.stringEditor.useRawCharacters=true
Comment 17 Jan Chalupa 2001-08-27 12:30:25 UTC
Adjusting target milestone.
Comment 18 Jesse Glick 2002-12-23 16:35:07 UTC
Consistent use of the I18N keyword.
Comment 19 Quality Engineering 2003-07-01 16:38:01 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.