Charset.best

string best(string inbuf)

Computes the best charset to use to encode this text buffer.

Parameters

inbufa UTF-8 text buffer

Returns

the charset name best suited for the input text

or null if it is ascii-safe.