Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 32392 - I18N - Edit Text Rather than Escape Sequences
I18N - Edit Text Rather than Escape Sequences
Product: utilities
Classification: Unclassified
Component: Properties
All All
: P2 with 1 vote (vote)
: 6.x
Assigned To: Marian Petras
: I18N, UI
: 35160 50757 (view as bug list)
Depends on:
Blocks: 32123 89720
  Show dependency treegraph
Reported: 2003-03-27 12:33 UTC by _ pkuzel
Modified: 2007-04-18 16:27 UTC (History)
4 users (show)

See Also:

The picture (2.12 KB, image/png)
2003-03-27 12:35 UTC, _ pkuzel

Note You need to log in before you can comment on or make changes to this bug.
Description _ pkuzel 2003-03-27 12:33:33 UTC
Currently properties files have assigned text
editor that let user edit escape sequences. It
means that user must write all non-ASCII text
using unicode escapes instead of typing it
directly on keyboard.

If he does not escape then he produces invalid
file without any feedback.

I propose to edit text at character level hiding
whole escaping logic. See attached picture. Upper
line is current state lower line is proposed state.
Comment 1 _ pkuzel 2003-03-27 12:35:15 UTC
Created attachment 9560 [details]
The picture
Comment 2 Jesse Glick 2004-10-07 01:01:17 UTC
*** Issue 35160 has been marked as a duplicate of this issue. ***
Comment 3 Marian Petras 2005-05-03 14:52:13 UTC
This is a reasonable enhancement, indeed.
Comment 4 Jesse Glick 2006-01-02 21:48:18 UTC
*** Issue 50757 has been marked as a duplicate of this issue. ***
Comment 5 gborkowski 2006-01-23 10:54:39 UTC
My proposal to this issue: 
Let's leave all those native encodings and stick to UTF-8 finally. All
.properties files in the src/ directory should be in UTF-8, and editor reads and
writes them in this formatm, whithout any escaping. Easy and powerful.
Then we add new ANT task which during copying those files from src/ to build/
will change the format from UTF-8 to all those \uxxxx needed by JVM.

Obviously, this won't work for configuration files used by NetBeans projects.
But those files CAN - I hope - and SHOULD be stored in UTF-8.
Comment 6 kovica 2006-04-26 13:46:51 UTC
Since Mustang B81 has fixed this
( will NetBeans 6.0
provide this funtionality, so that properties files will be saved in UTF-8?
Comment 7 Ken Frank 2006-05-04 18:03:27 UTC
Can team look at fixing this for next nb, and since as mentioned below
the newer jdk has fixed it ?
Comment 8 sir_no 2006-10-04 11:19:15 UTC
If the .properties files were opened by default in ResourceBundle editor
(via "Open" command) instead of text editor ("Edit" command - the default one),
I think that the whole problem would become less relevant.

The ResourceBundle editor already does the required translation (similar to what
native2ascii does) so editing .properties files manually is not no more necessary
to get the right encoding. You still must remember about users using JDK 1.4/1.5,
so they wouldn't be unnecesarily surprised.

This change is already proposed in issue #71885.
Comment 9 gborkowski 2006-10-04 13:30:57 UTC
The problem is that sometimes I need to edit those files manually, even in the
simplest editor like Notepad. Then I got bunch of /uxxxx's and it is illegible.
Suppose I want to send such file to smb to translate it - now it is difficult.
If files in "src" directory were in UTF-8, it would be no problem.
I'm not sure about Java 6, if it can read UTF-8 properties then for source 1.6
we could just copy those files, and for source <1.6 we copy them and call
nativeToAscii tool in build directory.
Comment 10 Jesse Glick 2006-12-10 20:24:38 UTC
See also issue #75906 and issue #90863.
Comment 11 Marian Petras 2007-04-18 16:25:59 UTC
Implementation and use of the specific encoding for .properties files (issue
#98761) resolved also this issue.

Modified files:
   ide/golden/deps.txt   (1.543)
   properties/   (1.69)
   properties/nbproject/project.xml   (1.12)
                                (1.1 - new)
                                (1.1 - new)

Comment 12 Marian Petras 2007-04-18 16:27:47 UTC
The issue the fix of which resolved this issue, was issue 97861 (not 98761).

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo