Bug 22332

Summary: [Encoding] No way to define an encoding for a file before it is read
Product: [Eclipse Project] Platform Reporter: Bob Foster <bob>
Component: UIAssignee: Nick Edgar <n.a.edgar>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

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 ***