Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 366357 - Maven Xtend Compiler- file encoding issue
Summary: Maven Xtend Compiler- file encoding issue
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.2.0   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: M5   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-12 03:15 EST by Matthijs CLA
Modified: 2017-09-19 17:17 EDT (History)
2 users (show)

See Also:
sven.efftinge: juno+


Attachments
proposed patch (7.22 KB, patch)
2011-12-12 17:10 EST, Michael Clay CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthijs CLA 2011-12-12 03:15:59 EST
Build Identifier: 

Currently the xtend-compiler reads the xtend files in a platform dependent encoding. This results in problems when the xtend files are encoded in another encoding. E.g. when the xtend  files are saved in ISO-8859-1 encoding, the build runs in problems on a Linus server with another default encoding. 

Suggestion is to add a parameter to the maven-xtend-compiler for the file encoding. Since the compiler is started in another JVM, the encoding might be passed to the JVM process with a jvm parameter, e.g. -Dfile.encoding=ISO-8859-1. 




Reproducible: Always

Steps to Reproduce:
Because xtext uses guillemot brackets («»), all my xtend files are in ISO-8859-1 encoding. Running the maven-xtend-compiler on Windows works fine, but on the Linux build the guillemot characters are not recognized.
Comment 1 Michael Clay CLA 2011-12-12 06:52:40 EST
have you tried to bind an IEncodingProvider to your language runtime module?
Comment 2 Sven Efftinge CLA 2011-12-12 06:56:51 EST
(In reply to comment #1)
> have you tried to bind an IEncodingProvider to your language runtime module?

He would have to do that for Xtend. 
We need to provide a property which can be set, which is then used in an IEncodingProvider.
Comment 3 Michael Clay CLA 2011-12-12 17:10:46 EST
Created attachment 208295 [details]
proposed patch

since i cannot build the required dependency 'org.eclipse.xtend2.standalone.maven' anymore i will leave a patch here for this - the default encoding value expression is 'project.build.sourceEncoding'
Comment 4 Michael Clay CLA 2011-12-14 15:49:06 EST
pushed to master
Comment 5 Karsten Thoms CLA 2017-09-19 17:05:04 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 6 Karsten Thoms CLA 2017-09-19 17:17:03 EDT
Closing all bugs that were set to RESOLVED before Neon.0