@Override
    public boolean shouldEscape(final char ch) {

      if (Verifier.isHighSurrogate(ch)) {
        return true;  // Safer this way per http://unicode.org/faq/utf_bom.html#utf8-4
      }

      return !encoder.canEncode(ch);
    }
@Override
    public boolean shouldEscape(final char ch)