public static CharsetEncoder getNewEncoder() {
        return UTF_8.newEncoder().onMalformedInput(CodingErrorAction.REPLACE)
                .onUnmappableCharacter(CodingErrorAction.REPLACE);
    }
Create a new UTF-8 encoder.

@see Utf8#toBytes(String, int, int, ByteBuffer, CharsetEncoder)
vespajlib/src/main/java/com/yahoo/text/Utf8.java