|
|
Re: Text file encoding and guillemets [message #684756 is a reply to message #684715] |
Thu, 16 June 2011 07:34 |
Akira Tanaka Messages: 98 Registered: March 2010 |
Member |
|
|
Hello Ed,
Thank you for the response.
I think ".settings/org.eclipse.core.resources.prefs file" is created per project, and so in case for my starting a new Xtext project this will work. But, that does not solve my issue. My issue is about handling of a sample domain model project (and others) shipped with Xtext 2.0(RC4, and probably true to the previous ones). This sample domain project is configured for ISO-8859-1, so if I create a new sample domain model project from File->New->Xtext Domain-Model Example, the source code introduced (including guillemets) looks fine regardless of the workspace's encoding setting. However, if I changed the project's encoding to UTF-8, the issue I described in the firs message will occur. And, I guess there are many Xtext projects found in Xtext Community page configured in the same way. I would hope Xtext team consider switching the default encoding from ISO-8859-1 to UTF-8, but if there is an easy way to handle this, that would be a great help.
Akria
|
|
|
|
Re: Text file encoding and guillemets [message #684764 is a reply to message #684642] |
Thu, 16 June 2011 07:47 |
Sebastian Zarnekow Messages: 3118 Registered: July 2009 |
Senior Member |
|
|
Hi Akira,
you could write a small plugin that allows to bulk-change the encoding
of files (basically automating the "copy change-encoding paste" step.
Thinking about it, something like this could already exist in the
eclipse universe.
Why do you need a specific encoding on the sample projects?
Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Am 16.06.11 02:59, schrieb Akira Tanaka:
> When created, a sample domain model project is configured using
> ISO-8859-1 as text file encoding. If I changed this to UTF-8, the french
> quotation marks or guillemets (of rich strings) are shown on the screen
> like the following.
>
> �val importManager = new ImportManager(true)�
>
> So, If I needed to work in UTF-8 (this is always the case with me), I
> need to change every part of the xtend files manually.
>
> «val importManager = new ImportManager(true)»
>
> Is there any convenient way to change the encoding? I found it possible
> to copy the souce code in memory by "select-all with control-C" in
> ISO-8859-1 then after swithing to UTF-8 it can be pasted in UTF-8, but
> this takes time if there are many xtend files defined in the generator.
>
> Thanks for your help in advance.
> Akira
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04464 seconds