|
|
|
Re: After Update to 2.11: Encoding Problem [message #1755458 is a reply to message #1755456] |
Fri, 03 March 2017 14:12 |
|
hmmm,
which is your platform encoding?
during debugging you do a StringConcatenation.toString.
this might do the bad visuals.
but the interesting part should be where the string is actually written to the file.
=> which is the encoding xtext uses to write the file
StringInputStream newContent = getInputStream(contentsAsString, encoding); //<-- what is encoding here. is it maybe windows ascii or something like that?
further debugging at org.eclipse.xtext.builder.EclipseResourceFileSystemAccess2.generateFile(IFile, InputStream, IFile, CharSequence, OutputConfiguration)
would be interesting as well.
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
|
|
|
Re: After Update to 2.11: Encoding Problem [message #1755462 is a reply to message #1755458] |
Fri, 03 March 2017 14:33 |
Klaus H. Messages: 14 Registered: July 2009 |
Junior Member |
|
|
Sorry. Forgot to mention that. Encoding in the EclipseResourceFileSystemAccess2.generateFile(String, String, CharSequence) method is UTF-8.
But the provided parameter content (type CharSequence) already contains the mis-encoded special character. You see this as bad visual?
What do you mean with platform encoding? Workspace encoding is set to UTF-8 always, while operation system default encoding is CP1252.
[Updated on: Fri, 03 March 2017 14:36] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
Re: After Update to 2.11: Encoding Problem [message #1755544 is a reply to message #1755475] |
Sun, 05 March 2017 13:06 |
Klaus H. Messages: 14 Registered: July 2009 |
Junior Member |
|
|
Problem solved. Seem to be neither caused by xtext nor by update xtext 2.11.0.
Solution: When exporting the plugin as above mentioned, you have to check the button "Use class files compiled in the workspace".
Explanation: My operation system (windows 7 in german) has a default encoding set to windows-1252 (aka CP 1252). All settings in my eclipse workspace are set to UTF-8. But when exporting the feature (incl. plugins) some background process seem to compile the sources again. And this hidden compile does not consider the workspace settings. By checking "Use class files compiled in the workspace" during the export process there seems to be no "background compile". Instead the compiled files from withing eclipse (which consideres the workspace setting) are used.
Please correct my explanation where necessary.
Many thanks for your help.
[Updated on: Sun, 05 March 2017 16:36] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.04725 seconds