Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Guillemets and UTF-8 encoding on Windows vs Mac
Guillemets and UTF-8 encoding on Windows vs Mac [message #1791179] Mon, 25 June 2018 13:57 Go to next message
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 261
Registered: July 2009
Senior Member
Hi,

I have two developers jointly working on a project that, among other things, contains some code-generation templates in Xtend. As these devs are students, I have very limited influence over their choice of hardware or OS. One of them uses Windows, the other one uses Mac.

When they share their source code via Git, they keep running into problems with the encoding of guillemots in the Xtend CG templates. The file encoding shows as UTF-8 on both machines, but the problems still exist. In particular, it seems that a guillemot is encoded as one UTF-8 character in Windows, but as two combining characters on the Mac.

As a result, collaboration between them becomes really painful, to put it mildly.

I'm assuming that others have run into this problem before. Has anybody found a good solution how to get the two OSs to play nice with each other with respect to guillemot encoding?

Many thanks,

Steffen
Re: Guillemets and UTF-8 encoding on Windows vs Mac [message #1791180 is a reply to message #1791179] Mon, 25 June 2018 14:11 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 12237
Registered: July 2009
Senior Member
i cannot reproduce that.
get on both mac and linux file size 2 bytes for a file containing « only
=> am not sure if the setup really is correct regarding encoding


Need professional support for Xtext, Xpand, EMF?
Go to: https://xtext.itemis.com
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Guillemets and UTF-8 encoding on Windows vs Mac [message #1791181 is a reply to message #1791180] Mon, 25 June 2018 14:23 Go to previous messageGo to next message
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 261
Registered: July 2009
Senior Member
Thanks, Christian.

Yes, on Mac a guillemet seems to be encoded as two characters. On Windows (not Linux), however, it seems to be encoded just as a single character.

Steffen
Re: Guillemets and UTF-8 encoding on Windows vs Mac [message #1791183 is a reply to message #1791181] Mon, 25 June 2018 14:41 Go to previous message
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 261
Registered: July 2009
Senior Member
Hah, seems I was wrong after all: The Windows user's Eclipse workspace was set to encode as CPS1252, which we hadn't spotted for some reason. We've changed this to UTF-8 now and things seem to be working.

Thanks for the pointer...

Steffen
Previous Topic:Create files only once
Next Topic:Error with optional semicon at the end of line
Goto Forum:
  


Current Time: Mon Sep 24 07:19:35 GMT 2018

Powered by FUDForum. Page generated in 0.05560 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top