Return the charset that best matches the supplied input data. Note though, that because the detection only looks at the start of the input data, there is a possibility that the returned charset will fail to handle the full set of input data.
Raise an exception if
- no charset appears to match the data.
- no input text has been provided
@return a CharsetMatch object representing the best matching charset, or
null
if there are no matches.
@stable ICU 3.4