i'd like to have all DSL files for my language created by eclipse (i.e. *.mydsl) encoded in UTF-8. Eclipse encodes the files in the system's standard encoding.
I added the encoding statement to the Generator as described in the documentation:
Generator {
encoding ="UTF-8"
...
My expectation was, that every newly created file will be encoded in UTF-8, but this isn't the case.
I did implement a IEncodingProvider returning UTF-8 and bound it in the Runtime and the UiModule. The Runtime part works as expected. The standalone parser interprets the files as UTF-8.
But Eclipse still produces files encoded in the system default codepage.
Creating files in Eclipse: select folder -> new -> file -> enter filename
That creates files in the default workspace encoding. Of course this can be changed by the user, but I'm looking for a way to set UTF-8 as default for my language's projects, so I don't have to tell the user to set his encoding.
I already toyed around with the SimpleProjectWizard, but it seemed like I need some time and a lot of know-how to get the projects the way I want them. I'll look into that.