Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363814 - Project wizards should allow to create projects with crossplatform encoding
Summary: Project wizards should allow to create projects with crossplatform encoding
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.1.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: RC3   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-15 08:08 EST by Thomas Schindl CLA
Modified: 2017-10-31 11:18 EDT (History)
3 users (show)

See Also:
moritz.eysholdt: kepler+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Schindl CLA 2011-11-15 08:08:00 EST
I've been hit by a problem I guess many people will get hit when they are using xtend. I've been starting my project over in Win32 where the default encoding of the workbench is CP1252, which leads to undesired effects e.g. on Mac because there the default encoding is different and things start to blow up.

This is no different than in any other project where one has .java-File but the difference is that xtend uses a high-bit char inside its language (the french quote) whereas in Java the language itself uses on ASCII chars (so one gets only hit if one has none externalized strings) beside that xtend with its multiline strings, ... is a very powerful template language and so having strings inside it makes much more sense than in Java.

Take those 2 things together the likeliness of charset problemes in xtend-Files is much bigger compared to standard java.

My proposal would be that the New Project-Wizard holds has an additional Drop-Down where one can specify the Project-Encoding (it should probably default to UTF-8).
Comment 1 Florian Quadt CLA 2011-11-15 08:16:48 EST
+1 for the UTF-8 default. This problem hit me twice already (forgot to switch it to UTF-8 after creation).
Would be really nice to see it in Xtext.
Comment 2 Sven Efftinge CLA 2011-11-15 08:19:25 EST
There is no project wizard for Xtend, so that would only solve the problem for Xtext users.
I'm more in favor of a warning (with a quick fix) but only as soon as we have compiler settings in the preferences, so people who explicitly want to use a specific encoding can turn the warning off.
Comment 3 Moritz Eysholdt CLA 2013-06-03 09:47:31 EDT
(In reply to comment #2)
> There is no project wizard for Xtend, so that would only solve the problem
> for Xtext users.

Newly created Xtext projects now use UTF-8 as their default encoding.
see http://git.eclipse.org/c/tmf/org.eclipse.xtext.git/commit/?id=cc045032ea0bf889f4d0bc4c044a67dc5a8e12fb

(In reply to comment #2)
> I'm more in favor of a warning (with a quick fix) but only as soon as we
> have compiler settings in the preferences, so people who explicitly want to
> use a specific encoding can turn the warning off.

Bug 383439 addressed this issues, too.
Comment 4 Eclipse Webmaster CLA 2017-10-31 11:07:16 EDT
Requested via bug 522520.

-M.
Comment 5 Eclipse Webmaster CLA 2017-10-31 11:18:44 EDT
Requested via bug 522520.

-M.