Computes the best charset to use to encode this text buffer.
a UTF-8 text buffer
input buffer length
the charset name best suited for the input text or null if it is ascii-safe.