}
// If we are still trying to generate WMLC,
if (willGenerateWMLC) {
// Then carefully check that the charset encoding's MIBenum value
// is valid in a WMLC context.
Encoding charsetEncoding = context.getCharsetEncoding();
if (charsetEncoding == null) {
throw new RuntimeException(
exceptionLocalizer.format("charset-not-found"));
}
int requestedMibEnum = charsetEncoding.getMIBEnum();
switch (requestedMibEnum) {
case Encoding.MIBENUM_NOT_CONFIGURED:
// Fall back to WML if there is no MIBEnum value configured.
// Seems nicer than just throwing an exception, although it
// may cause the problem to go unnoticed.