When writing code points in the supplementary range and the range is unsupported by the encoding (e.g. US-ASCII), the API does not emit the correct character references.
The code above should emit the character reference "𝔊" or "𝔊". Instead, it emits the surrogate pair "". (See Supplementary.java)
The XML spec says of supported code points: "any Unicode character, excluding the surrogate blocks, FFFE, and FFFF." The character references are marked as errors in the W3C online validator.
See AsciiCanEncode.java for naive escape code that iterates over code points instead of code units.