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 97320 - Unicode in editor pane not stored as such
Summary: Unicode in editor pane not stored as such
Status: RESOLVED DUPLICATE of bug 42638
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: issues@editor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-06 21:50 UTC by urhixidur
Modified: 2007-11-05 13:44 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 urhixidur 2007-03-06 21:50:33 UTC
Under Windows, Java source code that is stored in the system's default encoding
will be ANSI. If you type or paste Unicode characters lying outside that range
(e.g. "a macron" (\u0101), "a ogonek" (\u0105), etc.) they will appear correct
in the editor tab...Until the tab is closed and the source file re-opened, at
which point one will be horrified to realise that they've all been replaced by
question marks (and have to be typed in all over again!).  This substitution
occurs immediately at the byte code level, leading to a developer puzzling why
the "obviously correct" String in his code (as displayed in the editor tab)
shows with question marks in the local variables debugger pane.

This problem should be detected as soon as possible and acted upon.  One
possible desirable behaviour would be as follows:

The first time the user types or pastes in Unicode characters that are
un-encodable in the source file's current encoding, a dialog would appear
requesting instructions.  The choices offered would be: a) automatically
substitute Unicode escapes; b) change the file's encoding; or c) change the
IDE's Java Sources Default Encoding setting.

Obviously these options could also be set through the IDE's Advanced Options dialog.
Comment 1 Vitezslav Stejskal 2007-03-14 01:09:30 UTC

*** This issue has been marked as a duplicate of 42638 ***