Please use the Apache issue tracking system for new NetBeans issues ( !!

Bug 99345

Summary: I18N - Provide FileEncodingQueryImplementation in project's lookup
Product: uml Reporter: Tomas Zezula <tzezula>
Component: ProjectAssignee: issues <>
Status: NEW --- QA Contact: issues <>
Priority: P2 CC: gomi, kfrank
Version: 6.xKeywords: I18N
Target Milestone: TBD   
Hardware: All   
OS: All   
Issue Type: TASK Exception Report:
Bug Depends on:    
Bug Blocks: 97848    
Attachments: project zip

Description Tomas Zezula 2007-03-29 08:59:56 UTC
The new SPI FileEncodingQueryImplementation allows IDE components like editor,
search, etc to handle correctly encoding of files. The implementation of
FileEncodingQueryImplementation should be provided in the project's lookup.
The typical implementation of this query uses a project property with encoding
and returns a Charset.forName (evaluator.getProperty(name_of_encoding_property).
The project should also provide a control in the project's customizer to allow
user to change the encoding of the project.

For more info see issue: #42638
Comment 1 Ken Frank 2007-08-03 19:17:11 UTC
as part of writing spec on the overall topic of project encoding properties, I asked this question to dev
and got the answer below:

### question - uml has reverse engineer java project and code generation in java projects - can there be a conflict if 
uml assumes the java project encoding is that of locale user is in, but actual project and file encoding of the project
files is another encoding ?  (since uml will not query for the feq ?)

answer -

If UML does not use FEQ when doing reverse engineering it will generate
wrong diagrams, even worse may be synchronization with original code, it
may corrupt the original java code.

I realize uml was not going to implement this issue  for nb6, but am wondering if it would want to at
least for reading the project encoding of the java project, even if not provide the property ui on
its project properties ?
Comment 2 Viktor Lapitski 2007-08-03 23:17:47 UTC
the uml does use FEQ query to determine the encoding of the file being REd or CGed.
If the query returns nothing then the IO API methods used that don't require 
charset parameter, thus JVM default IO charset would be used in this case. 
Comment 3 Ken Frank 2007-08-04 04:37:23 UTC

Thanks for confirming about it; I will update the spec/doc on the feq.
Comment 4 Ken Frank 2007-12-05 19:24:23 UTC
Now that nb6 is done, can we see if this can be done for uml
now ?

uml is the only project type that does not provide a choice for
project encoding.
Comment 5 Ken Frank 2007-12-13 15:42:37 UTC
*** Issue 123756 has been marked as a duplicate of this issue. ***
Comment 6 Ken Frank 2008-01-02 18:02:56 UTC
attached is a project from a user that has the encoding of some xml files,
ie main_1199297895234.etld
"<?xml version="1.0" encoding="MS932"?>"

and others in utf-8 that might be related to this
problem - this situation has been seen in actual issue 123756 which
was closed as duplicate of this one - if 123756 seems to be separate
or should be left open for itself, please reopen it, and attach the attached project to it.
Comment 7 Ken Frank 2008-01-02 18:04:23 UTC
Created attachment 54614 [details]
project zip
Comment 8 Ken Frank 2008-05-15 16:30:29 UTC
will this task be done for 6.5 ?
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