@@ -0,0 +1,522 @@
+package railo.commons.io;%0A%0Aimport java.nio.charset.Charset;%0A%0Aimport railo.runtime.exp.PageException;%0Aimport railo.runtime.op.Caster;%0A%0Apublic class CharsetUtil %7B%0A%0A%09public static Charset toCharset(String charset) throws PageException %7B%0A%09%09try%7B%0A%09%09%09return Charset.forName(charset);%0A%09%09%7D%0A%09%09catch(Throwable t)%7B%0A%09%09%09throw Caster.toPageException(t);%0A%09%09%7D%0A%09%7D%0A%0A%09public static Charset toCharset(String charset,Charset defaultValue) %7B%0A%09%09try%7B%0A%09%09%09return Charset.forName(charset);%0A%09%09%7D%0A%09%09catch(Throwable t)%7B%0A%09%09%09return defaultValue;%0A%09%09%7D%0A%09%7D%0A%0A%7D%0A

add charset util class