Community
Participate
Working Groups
Need encoding error detection for text loading ResourceTextBuffer reads content regardless of encoding conversion error. It make the buffer un-saveable with invalid characters. But user cannot know the situation. It results, on the Text Editor, that modifications made to the buffer cannot be saved. Steps to Reproduce: 1. Import a little bit broken sample.jsp containing a following content to workspace ---------------- "<%@page pageEncoding=\"US-ASCII\"%>\n" + "\u00a9 My Company\n" // \u00a9 is a (C) mark, a charactor of ISO-8859-1 ---------------- # with WTP, the detected encoding is US-ASCII. # it's the same if you use file's properties dialog to set encoding 2. Open the file with Text Editor >> Text Editor opens. >> '(C)' is not present. No warning, no error. 3. Type text in 3rd line, and try to save it >> Error dalog saying 'Some characters cannot be mapped...' opens. >> And it never gets fixed because '(C)' is not present in the document. Expected Result: At step 2, similar to Bug #107007, some status should be set to the buffer, I think. And the editor should show the error. Build I20060602-1317 (3.2 RC7)
Test Case: 1. open a file using ISO-8859-1 2. add Alt+0169 3. save and close 4. change encoding to US-ASCII 5. open the file 6. type "foo" 7. save ==> dialog comes up We have to throw an exception and fail to open it. The user will then have to change the encoding in order to open that file in the editor.
*** Bug 159516 has been marked as a duplicate of this bug. ***
The exception should trigger the status editor with inlined control to change the encoding (same scenario as if there was an UnsupportedEncodingException). An deluxe solution would add an additional button to the status editor: [Open file and convert illegal characters] NOTE: we must check that using different read mechanisms doesn't affect performance. We won't have time to do this unless we get a high quality patch.
*** Bug 280233 has been marked as a duplicate of this bug. ***
*** Bug 285922 has been marked as a duplicate of this bug. ***
*** Bug 57556 has been marked as a duplicate of this bug. ***
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.