Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321830 - Encoding of open files is wrong, if project is cleaned
Summary: Encoding of open files is wrong, if project is cleaned
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 1.0.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: SR1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-05 04:16 EDT by Benjamin Schwertfeger CLA
Modified: 2017-09-19 18:07 EDT (History)
1 user (show)

See Also:
sebastian.zarnekow: helios+


Attachments
Give the encoding to the StringInputStream (800 bytes, patch)
2010-08-05 04:20 EDT, Benjamin Schwertfeger CLA
sven.efftinge: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Schwertfeger CLA 2010-08-05 04:16:44 EDT
The XtextResource load's the document input stream without encoding in the reparse method and call doLoad afterwards. This leads to broken encodings in the model. This is only visible, if you look at the document in memory, because the editor won't show the changes. The correct way would be an InputStream with encoding inside the reload method.

In my use case is a special action, which uses the current model in memory, transforms it and write to a different file. You can observe the wrong encoding, if you set a breakpoint in your model implementation files, where names are set, and clean your workspace to trigger reparse.
Comment 1 Benjamin Schwertfeger CLA 2010-08-05 04:20:03 EDT
Created attachment 175910 [details]
Give the encoding to the StringInputStream

Patch for setting the encoding also for reparse steps.
Comment 2 Sebastian Zarnekow CLA 2010-08-05 06:02:55 EDT
Fixed in HEAD.
Comment 3 Sebastian Zarnekow CLA 2010-08-05 06:03:06 EDT
Thanks for the patch.
Comment 4 Karsten Thoms CLA 2017-09-19 17:56:23 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 5 Karsten Thoms CLA 2017-09-19 18:07:14 EDT
Closing all bugs that were set to RESOLVED before Neon.0