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.
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.
*** This issue has been marked as a duplicate of 42638 ***