Home Forums General XMetaL Discussion XMetaL Developer: MCR-File with UTF-8 Encoding Reply To: XMetaL Developer: MCR-File with UTF-8 Encoding

Derek Read

Reply to: XMetaL Developer: MCR-File with UTF-8 Encoding

It looks like even when a .JS file is created in an XMetaL Developer 12 project and saved using the correct encoding (in this case UTF-8) when you build the project the MCR file that is generated can be encoded using UTF-16 LE for some reason.

At this point I don't know why this occurs, whether this is a Visual Studio issue, or whether XMetaL Developer can be made to control this.

The main issue is not the encoding however. XMetaL Author is capable of reading UTF-16 encoded MCR files or UTF-8 encoded MCR files. The issue is that for whatever reason, some characters are encoded incorrectly into the MCR file(in your example these include ä, ö, ü or ß). As far as I can tell the file is being written out as UTF-16 but the encoding for these characters is actually appears to be Latin1 for some reason.

The only immediate solution I can think of (unfortunately) is to build the MCR file as usual then open it directly in a text editor and replace incorrectly encoded characters before resaving the file (either as UTF-16 or UTF-8). Seems really painful.