Vlad Dumitrescu Messages: 313 Registered: July 2009 Location: Gothenburg
Senior Member
Hi!
My language files are encoded as Latin-1, but since the compiler's parser accepts anything inside comments and strings, many people in china and Russia and elsewhere use utf-8 in those places.
I did some quick tests and it looks like Xtext can handle those. Are there any hidden traps here?
Xtext can handle all encodings quite well (see IEncodingProvider). Of
course, you cannot mix encodings in the same file.
Regards,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Go visit: http://xtext.itemis.com
Am 27.07.12 11:33, schrieb Vlad Dumitrescu:
> Hi!
>
> My language files are encoded as Latin-1, but since the compiler's
> parser accepts anything inside comments and strings, many people in
> china and Russia and elsewhere use utf-8 in those places.
> I did some quick tests and it looks like Xtext can handle those. Are
> there any hidden traps here?
> best regards,
> Vlad
>
Vlad Dumitrescu Messages: 313 Registered: July 2009 Location: Gothenburg
Senior Member
Thank you, Sebastian.
What I meant was - with an infrastructure generated for a Latin-1 encoding, does it work to handle utf-8 files too, given the restriction that non-ascii characters are only found in comments and strings?