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 119942 - I18N - document about rules/warnings when saving certain files in other encodings
Summary: I18N - document about rules/warnings when saving certain files in other encod...
Status: RESOLVED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: Sun All
: P3 blocker (vote)
Assignee: Victor Vasilyev
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2007-10-24 18:34 UTC by Ken Frank
Modified: 2010-02-16 11:15 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Frank 2007-10-24 18:34:12 UTC
in nb6, for html, xml and jsp files, if user changes the encoding tag of the
file, but there are characters in the file not of that encoding
(and this does happen and then have been issues reported on it)

there are warning info to user asking if really want to save file since
it has characters that might not be converted ok into the current file encoding.

But the warning wording and actions might not seem clear; see 106473 on this;
also the behavior for xml files is different for jsp files.

Thus perhaps a sentence in sections of xml, html and jsp areas might be helpful
to explain about what the yes and no choices of the popups mean.

I think developers in those areas could give more technical details.
Comment 1 John Jullion-ceccarelli 2007-10-31 15:13:43 UTC
This will likely not be addressed in the online help for 6.0. We will cover it in FAQs on the wiki after online help
hand-off.
Comment 2 Ken Frank 2007-11-29 23:13:15 UTC
just following up about this to see if more info will be needed
for the faq for after nb6 fcs; please let me know if so.

ken.frank@sun.com
Comment 3 Troy Giunipero 2008-01-09 16:35:32 UTC
Ken,

How are you suggesting that the issue be solved?

Are you suggesting that:

    * the pop-up contain additional inline information, based on the type of file?
    * that a help button be added, and CSH provided for the pop-up?
    * that information be added to the OLH?

Regarding the 3rd option above, please note that information is already provided. 
For example:
 
    * In "About File Encodings" the following warnings are provided:

      The IDE does not convert characters when the encoding of a file changes. 
      If you manually change the encoding declaration within the file, and that 
      encoding does not match the project encoding, you may encounter problems 
      when compiling and running the project. This is due to the fact that the 
      encoding tag affects how file contents are viewed internally - not only 
      during runtime, but also during the design phase (i.e. adding content in 
      the Source Editor).

      Manually changing the character encoding declaration within a file changes 
      how the IDE reads and displays that file. When you change the file encoding, 
      the IDE does not convert the existing contents of the file to the new encoding. 
      Care should be taken when changing the encoding of a file because the file may 
      contain characters that cannot be saved or that may not display properly in the 
      new encoding.

    * In "Setting Page Character Encoding for a JSP File" the following is provided:

      The default pageEncoding attribute of a JSP file created in the IDE is as follows:
  
        <%@page pageEncoding="UTF-8"%>

      You can change the page encoding in the JSP file and save it. Note that the IDE warns 
      you if you try to save a character set that is not valid for JSP pages. Alternatively, 
      set the page encoding in the contentType attribute of the page directive instead. The 
      default contentType attribute of a JSP file does not contain a charset value, because 
      the pageEncoding attribute handles page encoding by default. However, you can add a 
      charset value as follows:

        <%@page contentType="text/html;charset=UTF-8"%>

Comment 4 Ken Frank 2008-01-09 16:58:00 UTC
Troy,

that olh text looks good; what I need to do is see the status on existing
issues related to this on the product and the discrepancy between the
behavior and wording of the popup about this for jsp vs xml
(I think html behaved same as jsp) - or is it ok that the behavior/wording be different.

until then I suggest doing no more with this since there could be some
change to how the situation is handled for one or both.

but what is written in olh now, in the first part, is great and reflects
that ide will not change the encoding for user.

its the second part where we need to see how the other issues will
be handled by dev, but for now what is stated for jsp seems accurate.

ken.frank@sun.com
Comment 5 Troy Giunipero 2008-05-12 11:33:34 UTC
Reassigning to usersguide > ui.  This is a matter concerning context-sensitive help within the IDE.  The documentation in the OLH is currently sufficient.
Comment 6 Irina Filippova 2010-02-16 11:15:19 UTC
Closing the issue as it is not related to documentation. Can be reopened in the correct category.