I have FreeMarker being used on an application running on Windows 7 in a Chinese locale. The .ftl file includes this XML:
<run fontname='Arial'>Æ </run>
The text is the letter Æ (the grapheme of AE, U+00C6) followed by an encoded newline. There is no FreeMarker text substitution on this line.
After FreeMarker text substitution is run on the file, the XML is changed, losing the ampersand:
<run fontname='Arial'>Æ#10;</run>
Without the ampersand, the encoded newline is lost, and the text "#10;" is displayed instead.
This isn't happening in other Windows systems running with other locales (English, French, German, and most notably Japanese). How can I avoid this, or is this a bug?