Bug 22332 - [Encoding] No way to define an encoding for a file before it is read
Summary: [Encoding] No way to define an encoding for a file before it is read
Status: RESOLVED DUPLICATE of bug 5399
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nick Edgar CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-09 23:17 EDT by Bob Foster CLA
Modified: 2002-09-03 14:17 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bob Foster CLA 2002-08-09 23:17:43 EDT
In fact, the only way to read a file with an encoding other than the workbench
default is to read it in wrong and then re-read it. This is odd.

The code is a bit odd, too. StorageDocumentProvider createDocument() calls
getEncoding() which wants to get the incoding from StorageInfo which hasn't been
created yet. So it returns null which is later replaced by the default. This is
obviously the point at which auto-detection or other encoding determination
should be done, but of course at that point there is no place to save the
encoding so it will get into the info.
Comment 1 Kevin Haaland CLA 2002-09-03 14:17:55 EDT

*** This bug has been marked as a duplicate of 5399 ***