utf-7

Loading a Java Charset manually

落花浮王杯 提交于 2019-11-26 21:38:19
问题 I'm doing some work using the JavaMail API, and I've run across encodings which Java doesn't support natively (by design), such as UTF7/unicode-1-1-utf-7. For that encoding in particular I found the JUTF7 implementation of a Java Charset and CharsetProvider for UTF7. However, having added the jutf7.jar to my classpath I still get UnsupportedEncodingException s, and unicode-1-1-utf-7 is definitely one of JUTF7's aliases. Is there a way to manually load the Charset or ensure that the Charset is