Bug 51826 - [encoding] Automatic unicode escaping
Summary: [encoding] Automatic unicode escaping
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-12 08:02 EST by Robin Rosenberg CLA
Modified: 2009-08-07 03:46 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.