Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 321830

Summary: Encoding of open files is wrong, if project is cleaned
Product: [Modeling] TMF Reporter: Benjamin Schwertfeger <benjamin.schwertfeger>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow
Version: 1.0.0Flags: sebastian.zarnekow: helios+
Target Milestone: SR1   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Give the encoding to the StringInputStream sven.efftinge: iplog+

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