add a sanity check for the encoding returned by ICU4J