Bug 191653 - Char encoding for xpand templates should be UTF-8
Summary: Char encoding for xpand templates should be UTF-8
Status: RESOLVED FIXED
Alias: None
Product: GMF-Tooling (ARCHIVED)
Classification: Modeling
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: 2.2   Edit
Assignee: Artem Tikhomirov CLA
QA Contact:
URL: news://news.eclipse.org:119/f43o5r$ug...
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2007-06-08 04:50 EDT by jan.koehnlein CLA
Modified: 2010-07-19 12:19 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jan.koehnlein CLA 2007-06-08 04:50:44 EDT
Build ID: I20070601-1539

Steps To Reproduce:
Xpand uses the french << >> signs to mark template directives. Unfortunately, these are represented differently in various character encodings.

If you import the org.eclipse.gmf.codegen plug-in, you have to manually set the encoding of the xpt folder to ISO-8859-1. You also cannot write xpt aspect using a different encoding. This is especially annoying, because the error doesn't show up before the generation step, and you might have to rewrite the complete file then.

The standard char encoding for Java is UTF-8. It is most likely, GMF users are coding Java in the same workspace. To avoid switching, I'd suggest the encoding should be changed to UTF-8.
Comment 1 Artem Tikhomirov CLA 2009-03-18 16:35:18 EDT
Guess, with all these QVTO migrations/changes, modification of xpt file encoding is not as troublesome as it could be otherwise ;)

I've committed the change to use UTF-8 as default encoding for the GMF Xpand templates.  I did my best to ensure old templates, with ISO-8859-1 encoding are recognized and don't need to be changed right away (i.e. we try to detect whether .xpt file comes in UTF-8 or UTF-16 encoding, and, if neither's BOM is detected, we look for << and >> characters, and suggest old, ISO-8859-1 encoding if found any)

Until tomorrow, when there's a new gmf/xpand build that is capable to recognize .xpt files both in UTF-8 and ISO-8859-1, I won't commit updated GMF templates (GMFGen and GMFGraph codegen)
Comment 2 Artem Tikhomirov CLA 2009-03-18 16:36:47 EDT
If I forgot to CC anyone who'd better know about the change, please go ahead and do it yourself. Thanks ;)
Comment 3 Artem Tikhomirov CLA 2009-03-19 09:25:40 EDT
GMF templates (codegen, codegen.lite, graphdef.codegen) were updated to use UTF-8
Comment 4 Eclipse Webmaster CLA 2010-07-16 23:35:58 EDT
[target cleanup] 2.2 M6 was the original target milestone for this
bug
Comment 5 Eclipse Webmaster CLA 2010-07-19 12:19:49 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Templates was the original product and component for this bug