List of usage examples for org.apache.commons.codec.net QuotedPrintableCodec decode
public String decode(String pString, String charset) throws DecoderException, UnsupportedEncodingException
From source file:jp.co.worksap.message.decoder.HeaderDecoder.java
private String decodeTextByQuotedPrintable(String encodedText, String charset) throws UnsupportedEncodingException, DecoderException { // QuotedPrintableCodec version 1.3 don't implement to replace "_" to // " ". the rule is in header. String grepped = encodedText.replaceAll("_", " "); QuotedPrintableCodec codec = new QuotedPrintableCodec(); return codec.decode(grepped, charset); }