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 92642 - I18N - not all multibyte shows properly in editor of java project
Summary: I18N - not all multibyte shows properly in editor of java project
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: Sun All
: P3 blocker (vote)
Assignee: Jan Lahoda
URL:
Keywords: I18N
Depends on: 42638
Blocks:
  Show dependency tree
 
Reported: 2007-01-16 18:26 UTC by Ken Frank
Modified: 2007-10-12 20:09 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
image (81.30 KB, image/gif)
2007-01-16 18:27 UTC, Ken Frank
Details
image (52.55 KB, image/gif)
2007-03-17 17:38 UTC, Ken Frank
Details
image (53.48 KB, image/gif)
2007-03-24 20:08 UTC, Ken Frank
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Frank 2007-01-16 18:26:18 UTC
This was not a problem in previous releases.

running in ja locale, create a java project with multibyte as part of the name,
which also seeds the class name with multibyte.

In the editor, not all of the multibyte shows properly - the name of the Main
class shows using escapped ascii ie
Main\u7CA4\u308D()

and the \ is marked with a red mark, though its not an error one

see attached file, and you can see other parts show the multibyte ok.

In previous releases, the multibyte of the class name showed properly.
Comment 1 Ken Frank 2007-01-16 18:27:08 UTC
Created attachment 37416 [details]
image
Comment 2 Tomas Zezula 2007-02-14 10:30:26 UTC
The issue has two parts:
1) Highlighting should not mark unicode escapes as errors.
2) Java editor should be rewritten to use the FileEncodingQuery when available
to properly render the content. See:
http://www.netbeans.org/issues/show_bug.cgi?id=42638
Comment 3 Tomas Zezula 2007-03-14 15:42:00 UTC
Set the correct encoding in the j2seproject properties / source panel.
The other project types don't have this option yet, I will fill an issues
and send you the issue numbers.

The only problem is, that syntax highlighting marks unicode escapes as errors,
but this is not P2.

Checking in openide/loaders/manifest.mf;
/cvs/openide/loaders/manifest.mf,v  <--  manifest.mf
new revision: 1.31; previous revision: 1.30
done
Checking in openide/loaders/api/apichanges.xml;
/cvs/openide/loaders/api/apichanges.xml,v  <--  apichanges.xml
new revision: 1.26; previous revision: 1.25
done
Checking in openide/loaders/nbproject/project.xml;
/cvs/openide/loaders/nbproject/project.xml,v  <--  project.xml
new revision: 1.27; previous revision: 1.26
done
RCS file:
/cvs/openide/loaders/src/META-INF/services/org.netbeans.spi.queries.FileEncodingQueryImplementation,v
done
Checking in
openide/loaders/src/META-INF/services/org.netbeans.spi.queries.FileEncodingQueryImplementation;
/cvs/openide/loaders/src/META-INF/services/org.netbeans.spi.queries.FileEncodingQueryImplementation,v
 <--  org.netbeans.spi.queries.FileEncodingQueryImplementation
initial revision: 1.1
done
RCS file:
/cvs/openide/loaders/src/org/netbeans/modules/openide/loaders/DataObjectEncodingQueryImplementation.java,v
done
Checking in
openide/loaders/src/org/netbeans/modules/openide/loaders/DataObjectEncodingQueryImplementation.java;
/cvs/openide/loaders/src/org/netbeans/modules/openide/loaders/DataObjectEncodingQueryImplementation.java,v
 <--  DataObjectEncodingQueryImplementation.java
initial revision: 1.1
done
Checking in openide/loaders/src/org/openide/text/DataEditorSupport.java;
/cvs/openide/loaders/src/org/openide/text/DataEditorSupport.java,v  <-- 
DataEditorSupport.java
new revision: 1.40; previous revision: 1.39
done
Checking in
openide/loaders/test/unit/src/org/openide/text/DataEditorSupportTest.java;
/cvs/openide/loaders/test/unit/src/org/openide/text/DataEditorSupportTest.java,v
 <--  DataEditorSupportTest.java
new revision: 1.7; previous revision: 1.6
done
Checking in
java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProject.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProject.java,v
 <--  J2SEProject.java
new revision: 1.78; previous revision: 1.77
done
Checking in
java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectGenerator.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectGenerator.java,v
 <--  J2SEProjectGenerator.java
new revision: 1.54; previous revision: 1.53
done
RCS file:
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/queries/J2SEProjectEncodingQueryImpl.java,v
done
Checking in
java/j2seproject/src/org/netbeans/modules/java/j2seproject/queries/J2SEProjectEncodingQueryImpl.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/queries/J2SEProjectEncodingQueryImpl.java,v
 <--  J2SEProjectEncodingQueryImpl.java
initial revision: 1.1
done
Checking in
java/j2seproject/src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl,v
 <--  build-impl.xsl
new revision: 1.83; previous revision: 1.82
done
Checking in
java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/Bundle.properties;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.86; previous revision: 1.85
done
Checking in
java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerSources.form;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerSources.form,v
 <--  CustomizerSources.form
new revision: 1.9; previous revision: 1.8
done
Checking in
java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerSources.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerSources.java,v
 <--  CustomizerSources.java
new revision: 1.14; previous revision: 1.13
done
Checking in
java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/J2SEProjectProperties.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/J2SEProjectProperties.java,v
 <--  J2SEProjectProperties.java
new revision: 1.63; previous revision: 1.62
done
RCS file:
/cvs/java/j2seproject/test/unit/src/org/netbeans/modules/java/j2seproject/queries/FileEncodingQueryTest.java,v
done
Checking in
java/j2seproject/test/unit/src/org/netbeans/modules/java/j2seproject/queries/FileEncodingQueryTest.java;
/cvs/java/j2seproject/test/unit/src/org/netbeans/modules/java/j2seproject/queries/FileEncodingQueryTest.java,v
 <--  FileEncodingQueryTest.java
initial revision: 1.1
done
Checking in
java/source/src/org/netbeans/modules/java/source/parsing/SourceFileObject.java;
/cvs/java/source/src/org/netbeans/modules/java/source/parsing/SourceFileObject.java,v
 <--  SourceFileObject.java
new revision: 1.6; previous revision: 1.5
done
Checking in projects/projectapi/overview.html;
/cvs/projects/projectapi/overview.html,v  <--  overview.html
new revision: 1.5; previous revision: 1.4
done
RCS file:
/cvs/projects/projectapi/src/META-INF/services/org.netbeans.spi.queries.FileEncodingQueryImplementation,v
done
Checking in
projects/projectapi/src/META-INF/services/org.netbeans.spi.queries.FileEncodingQueryImplementation;
/cvs/projects/projectapi/src/META-INF/services/org.netbeans.spi.queries.FileEncodingQueryImplementation,v
 <--  org.netbeans.spi.queries.FileEncodingQueryImplementation
initial revision: 1.1
done
Checking in projects/projectapi/src/org/netbeans/api/project/Project.java;
/cvs/projects/projectapi/src/org/netbeans/api/project/Project.java,v  <-- 
Project.java
new revision: 1.18; previous revision: 1.17
done
RCS file:
/cvs/projects/projectapi/src/org/netbeans/modules/projectapi/ProjectFileEncodingQueryImplementation.java,v
done
Checking in
projects/projectapi/src/org/netbeans/modules/projectapi/ProjectFileEncodingQueryImplementation.java;
/cvs/projects/projectapi/src/org/netbeans/modules/projectapi/ProjectFileEncodingQueryImplementation.java,v
 <--  ProjectFileEncodingQueryImplementation.java
initial revision: 1.1
done
Checking in projects/queries/apichanges.xml;
/cvs/projects/queries/apichanges.xml,v  <--  apichanges.xml
new revision: 1.7; previous revision: 1.6
done
Checking in projects/queries/arch.xml;
/cvs/projects/queries/arch.xml,v  <--  arch.xml
new revision: 1.11; previous revision: 1.10
done
Checking in projects/queries/manifest.mf;
/cvs/projects/queries/manifest.mf,v  <--  manifest.mf
new revision: 1.12; previous revision: 1.11
done
Checking in projects/queries/nbproject/project.xml;
/cvs/projects/queries/nbproject/project.xml,v  <--  project.xml
new revision: 1.11; previous revision: 1.10
done
RCS file:
/cvs/projects/queries/src/org/netbeans/api/queries/FileEncodingQuery.java,v
done
Checking in projects/queries/src/org/netbeans/api/queries/FileEncodingQuery.java;
/cvs/projects/queries/src/org/netbeans/api/queries/FileEncodingQuery.java,v  <--
 FileEncodingQuery.java
initial revision: 1.1
done
RCS file:
/cvs/projects/queries/src/org/netbeans/modules/queries/UnknownEncoding.java,v
done
Checking in projects/queries/src/org/netbeans/modules/queries/UnknownEncoding.java;
/cvs/projects/queries/src/org/netbeans/modules/queries/UnknownEncoding.java,v 
<--  UnknownEncoding.java
initial revision: 1.1
done
RCS file:
/cvs/projects/queries/src/org/netbeans/spi/queries/FileEncodingQueryImplementation.java,v
done
Checking in
projects/queries/src/org/netbeans/spi/queries/FileEncodingQueryImplementation.java;
/cvs/projects/queries/src/org/netbeans/spi/queries/FileEncodingQueryImplementation.java,v
 <--  FileEncodingQueryImplementation.java
initial revision: 1.1
done
RCS file:
/cvs/projects/queries/test/unit/src/org/netbeans/api/queries/FileEncodingQueryTest.java,v
done
Checking in
projects/queries/test/unit/src/org/netbeans/api/queries/FileEncodingQueryTest.java;
/cvs/projects/queries/test/unit/src/org/netbeans/api/queries/FileEncodingQueryTest.java,v
 <--  FileEncodingQueryTest.java
initial revision: 1.1
done
RCS file:
/cvs/projects/queries/test/unit/src/org/netbeans/api/queries/data/data.properties,v
done
Checking in
projects/queries/test/unit/src/org/netbeans/api/queries/data/data.properties;
/cvs/projects/queries/test/unit/src/org/netbeans/api/queries/data/data.properties,v
 <--  data.properties
initial revision: 1.1
done
RCS file:
/cvs/projects/queries/test/unit/src/org/netbeans/api/queries/data/encoding_after_block,v
done
Checking in
projects/queries/test/unit/src/org/netbeans/api/queries/data/encoding_after_block;
/cvs/projects/queries/test/unit/src/org/netbeans/api/queries/data/encoding_after_block,v
 <--  encoding_after_block
initial revision: 1.1
done
RCS file:
/cvs/projects/queries/test/unit/src/org/netbeans/api/queries/data/encoding_on_block,v
done
Checking in
projects/queries/test/unit/src/org/netbeans/api/queries/data/encoding_on_block;
/cvs/projects/queries/test/unit/src/org/netbeans/api/queries/data/encoding_on_block,v
 <--  encoding_on_block
initial revision: 1.1
done
RCS file:
/cvs/projects/queries/test/unit/src/org/netbeans/api/queries/data/encoding_on_block_long,v
done
Checking in
projects/queries/test/unit/src/org/netbeans/api/queries/data/encoding_on_block_long;
/cvs/projects/queries/test/unit/src/org/netbeans/api/queries/data/encoding_on_block_long,v
 <--  encoding_on_block_long
initial revision: 1.1
done
RCS file:
/cvs/projects/queries/test/unit/src/org/netbeans/api/queries/data/encoding_on_start,v
done
Checking in
projects/queries/test/unit/src/org/netbeans/api/queries/data/encoding_on_start;
/cvs/projects/queries/test/unit/src/org/netbeans/api/queries/data/encoding_on_start,v
 <--  encoding_on_start
initial revision: 1.1
done
RCS file:
/cvs/projects/queries/test/unit/src/org/netbeans/api/queries/data/encoding_on_start_long,v
done
Checking in
projects/queries/test/unit/src/org/netbeans/api/queries/data/encoding_on_start_long;
/cvs/projects/queries/test/unit/src/org/netbeans/api/queries/data/encoding_on_start_long,v
 <--  encoding_on_start_long
initial revision: 1.1
done
RCS file:
/cvs/projects/queries/test/unit/src/org/netbeans/api/queries/data/no_encoding,v
done
Checking in
projects/queries/test/unit/src/org/netbeans/api/queries/data/no_encoding;
/cvs/projects/queries/test/unit/src/org/netbeans/api/queries/data/no_encoding,v
 <--  no_encoding
initial revision: 1.1
done
RCS file:
/cvs/projects/queries/test/unit/src/org/netbeans/api/queries/data/no_encoding_long,v
done
Checking in
projects/queries/test/unit/src/org/netbeans/api/queries/data/no_encoding_long;
/cvs/projects/queries/test/unit/src/org/netbeans/api/queries/data/no_encoding_long,v
 <--  no_encoding_long
initial revision: 1.1
done
Checking in ide/golden/deps.txt;
/cvs/ide/golden/deps.txt,v  <--  deps.txt
new revision: 1.473; previous revision: 1.472
done
Comment 4 Ken Frank 2007-03-17 17:37:31 UTC
using 0315, now the multibyte in the
packagename in java file is not correct, not showing escaped ascii as in 
original issue for the class name, but random or garbage characters. see most
recent gif here.

Don't know if this is related the new project properties for java projects,
which defaults to utf8 and assume would handle encoding ok so that
the mbyte would show ok, no matter what locale user is in when running ide.


ken.frank@sun.com
Comment 5 Ken Frank 2007-03-17 17:38:22 UTC
Created attachment 39610 [details]
image
Comment 6 Ken Frank 2007-03-24 20:07:31 UTC
I dont think user should need to set project encoding if they are not trying to
change
encoding to be different than the encoding of the locale they are running in -
which can be viewed as the default.

but I think the original bug is fixed - that the name of main class shows ok
but as per latest gif, the comments in the file that tell the name of the class
have incorrect multibyte.

But there is a problem also with, when creating a new file->swing frame,
using mbyte in the wizard as class name, the code has
incorrect multibyte as class name and method name - see newest gif
framemb.gif

note that in editor, in the gif, the mbyte that looks like iti might be correct
is not correct - compare to the mbyte in the explorer for this file.

also notice the navigator window on left has incorrect mbyte that is different
tban incorrect mbyte in the editor

*** am on solaris, so changing the project encoding to euc-jp, which is the
default encoding of solaris ja locale, seems to fix above new 2 problems -
but again, user should not be required to set encoding in this case - the encoding
of the locale they are in shd be used -- I think the project encoding option is
for those who want to use an encoding different that the default encoding of the
locale they are in.


--> should new issues be filed for both of the above ?

ken.frank@sun.com
Comment 7 Ken Frank 2007-03-24 20:08:07 UTC
Created attachment 39919 [details]
image
Comment 8 Jiri Prox 2007-09-17 20:33:47 UTC
Obsolete milestone, please reevaluate
Comment 9 Ken Frank 2007-10-03 17:57:21 UTC
is this issue considered resolved - if so can it be put in resolved state, then will verify.

ken.frank@sun.com
Comment 10 kaa 2007-10-04 16:46:25 UTC
checked on S10, build 0927, Java project with mbyte in names.
looks ok.
Comment 11 Jan Lahoda 2007-10-12 19:52:17 UTC
Marking as fixed them.
Comment 12 Ken Frank 2007-10-12 20:09:41 UTC
verifying based on Andrey's comments below that it looks ok.

ken.frank@sun.com