Bug 51826

Summary: [encoding] Automatic unicode escaping
Product: [Eclipse Project] JDT Reporter: Robin Rosenberg <robin.rosenberg>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, david_williams
Version: 3.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Robin Rosenberg CLA 2004-02-12 08:02:35 EST
If I enter a unicode character that does not match the character set for my 
editor it will appear ok, but silently get replaced by a '?'. This is so far 
mostly a theoretic problem, but I see it coming RSN. 
 
For Java source code this could be handled with automatic unicode escaping in a 
number of ways. My preferred solution is this: 
 
Unicode escapes could be presented as the character they represent and be 
editable as one character instead of the unicode sequence as this would help 
editing localized string data without the hassle of being forced to a 
particular character set in order to make it practical to edit a file.  
 
Options:  
[x] Automaticaly save non-ascii as unicode escape 
[ ] Automaticaly convert characters not in the default character set as unicode 
escapes 
[x] Display unicode escapes as unicode character 
[x] Mark characters not in the default character as an error/warning 
[ ] Mark non-ascii characters as an error/warning 
 
Another variant, perhaps user selectable, is to tootip the character when the 
mouse is hovering above the unicode sequence. 
 
Yet another related idea (while I'm at it) is a non-standard java-extension 
"@encoding utf-8" in beginning of the source file, although that would be even 
better if SUN would adapta a way of encoding the character set.
Comment 1 Dani Megert CLA 2004-02-16 08:41:20 EST
see also bug 6781 and bug 9069
Comment 2 Dani Megert CLA 2009-08-07 03:46:08 EDT
Already for quite some time now, characters aren't lost but save is not allowed.