* Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
*/
class EncoderFactory {
static CharsetEncoder createEncoder( String encodin ) {
Charset cs = Charset.forName(System.getProperty("file.encoding"));
CharsetEncoder encoder = cs.newEncoder();
if( cs.getClass().getName().equals("sun.nio.cs.MS1252") ) {
try {
// at least JDK1.4.2_01 has a bug in MS1252 encoder.
// specifically, it returns true for any character.