Community
Participate
Working Groups
Build Identifier: I20100527-1700 If you have an Xpand Script to replace characters, than the following statement will work correctly: "צה�".replaceAll("ה","ae") ==> "צae�" Whereas the following will not work: "צה�".toLowerCase().replaceAll("ה", "ae") ==> "צה�" See the following link for a more detailed discussion and a demo project (the discussion is in German!) http://oaw-forum.itemis.de/forum/viewtopic.php?forum=1&showtopic=2213 Reproducible: Always Steps to Reproduce: See Dateils above and the demo project at: http://www.swc.rwth-aachen.de/DOCUMENTS/utf8test.zip
This is an encoding issue. The ResourceLoaderDefaultImpl#createReader() tries to detect the encoding by heuristics. While the XPT file is correctly identified as UTF-8, this fails for the EXT file, which is recognized as ISO-8859-1. The input file encoding must be set through the ResourceManager, like follows: component = org.eclipse.xpand2.Generator { fileEncoding="UTF-8" metaModel = org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel {} expand = expand outlet = { path = targetDir fileEncoding="UTF-8" postprocessor = org.eclipse.xtend.typesystem.xsd.XMLBeautifier { } } resourceManager = org.eclipse.xtend.expression.ResourceManagerDefaultImpl { fileEncoding = "UTF-8" } } See also "Generator Workflow Configuration: Encoding" of Xpand manual.
Requested via bug 522520. -M.