1) Open SciTE
2) Save the empty document with an .xml extension (e.g. foo.xml)
3) Copy and paste this into the document: &—
4) SciTE displays "&—�"
5) "—�" is treated as a single character for the purpose of editing
6) Save the document again — the actual contents are correct ("&—").
7) The problem can't be reproduced unless editing an XML document.
Found on SciTE 1.78 Win32. Not tested on other platforms. Not sure if this is a SciTE or Scintilla problem.
— is a 3 byte character in UTF-8 and the XML lexer decided it wasn't a valid entity after the first byte leading to drawing broken part characters. Fixed in the lexer by not including the initial byte in the entity def style.