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 97855 - Provide FileEncodingQueryImplementation.
Summary: Provide FileEncodingQueryImplementation.
Status: VERIFIED FIXED
Alias: None
Product: javame
Classification: Unclassified
Component: Build System (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Adam Sotona
URL:
Keywords:
Depends on:
Blocks: 97848
  Show dependency tree
 
Reported: 2007-03-14 16:08 UTC by Tomas Zezula
Modified: 2007-08-14 03:47 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot of the panel (47.00 KB, image/jpeg)
2007-06-05 15:06 UTC, Lukas Hasik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Zezula 2007-03-14 16:08:08 UTC
The project should provide FileEncodingQueryImplementation in its lookup and
javac task should use encoding argument. See the umbrella issue.
Comment 1 Adam Sotona 2007-04-23 16:47:13 UTC
implemented
Comment 2 Ken Frank 2007-06-04 19:40:53 UTC
I don't see the option for project file encoding on the mobiltly applications
project 
properties window, like it is for other projects that have implemented this.
Can it be there or is it in some other location ?

ken.frank@sun.com
Comment 3 Adam Sotona 2007-06-05 11:10:05 UTC
Encoding field in Compiling category of Project Properties was introduced in 5.0.
FileEncodingQueryImplementation is now consuming this information already
provided by our project.
Comment 4 Lukas Hasik 2007-06-05 15:06:43 UTC
Created attachment 43244 [details]
screenshot of the panel
Comment 5 Ken Frank 2007-06-05 15:34:37 UTC
could there be the dropdown with other encoding choices as has been done for the
other feq implementations done so far by other project types ?

ken.frank@sun.com
Comment 6 Adam Sotona 2007-06-05 16:57:38 UTC
yes, done
Comment 7 Lukas Hasik 2007-06-06 13:20:57 UTC
please, set up the correct target milestone for FIXED issue. It's not obvious
from date in what build the issue has been fixed.

thank you
Comment 8 Ken Frank 2007-06-18 22:22:10 UTC
It does not seem the mobility project writes the global encoding value:

1. create new j2se project (j2se project known to read/write global encoding value ok

2.  change the encoding value to something else.

3. create new java desktop project

4. look at the encoding property - it is the one created in step 2, so this works ok.

5. change the encoding value of the mobility project.

6. create new mobility and then also new  j2se project

7. the new project encoding property is not the one changed in step 5 - this is the part that does not appear to work.


PS - please  also review the code also for the following situations:

a. that the project encoding will be used for compilation  and all other activities in using form editor functionality
where sense
of encoding is needed to process files and data.

a1. that the other kinds of mobility projects, including those with existing source, read and write the project encoding
and work well with it - one can run even in en locale for that part of the testing

b. that when it does change the encoding, that new files created in the project use the new encoding
(besides html, jsp and xml - see c. below - this may not be needed if mobility projects does not use jsp or html files.

c. as per spec/infoTomas provided, and as part of other tasks, 97871 and 97873
the charset tag, if present, in jsp and html files will be used for the
encoding versus that of the project encoding -- please make sure these
2 senses of encoding work together in the project.

d. We are assuming that for java and other non html and jsp files,
that the project encoding will be used.

for text files,  97861 was done for properties, but 97867 related to
autodetect encoding of text files is not done, so expectation
is just that text files are created and processed in the encoding
of the project.

ken.frank@sun.com
Comment 9 Tomas Zezula 2007-06-21 09:28:35 UTC
The mobility project should update the default encoding when the encoding is changed in the project customizer. The fix
is simple, add:
FileEncodingQuery.setDefassultEncoding(newEncoding) into the code storing the project properties.
Comment 10 Adam Sotona 2007-07-30 15:07:46 UTC
fixed
Comment 11 Ken Frank 2007-08-05 19:45:07 UTC
reopening - the global project encoding is not being used when create the project - the encoding of the
locale user is in is being used; and when changing the project encoding of this project, it does not
cause next created project like j2se project, or another mobility project, to use that encoding.

ken.frank@sun.com
Comment 12 Adam Sotona 2007-08-09 16:42:48 UTC
exporting the last used encoding already works
using FileEncodingQuery during project creation was not effective because all default property values were cached - it
is fixed now
Comment 13 Ken Frank 2007-08-14 03:47:35 UTC
verified.