writeChars(DOLLAR_LITERAL, 0, 1);
writeStart = i + 1;
writeLength = 0;
break;
default :
CharacterRepresentable rep = encoding.checkCharacter(c);
if (rep.isRepresentable()) {
writeLength++;
} else {
writeChars(chars, writeStart, writeLength);
valueSerialiser.addEntity(c);
writeStart = i + 1;