private Charset getCharset ( final String value ) { Charset c = null ; if ( value != null ) { final String [ ] tokens = value . trim ( ) . split ( "[;=]" ) ; if ( tokens . length >= 3 && tokens [ 1 ] . trim ( ) . equals ( "charset" ) ) { try { c = Charset . forName ( tokens [ 2 ] . trim ( ) ) ; } catch ( final RuntimeException e ) { logger . error ( MessageUtils . getMessage ( "DOTJ052E" , tokens [ 2 ] . trim ( ) ) . toString ( ) ) ; } } } if ( c == null ) { final String defaultCharset = Configuration . configuration . get ( "default.coderef-charset" ) ; if ( defaultCharset != null ) { c = Charset . forName ( defaultCharset ) ; } else { c = Charset . defaultCharset ( ) ; } } return c ; }
Get code file charset .