Outlook sometimes stores a codepage of ANSI when it means 1252, detect and alias, fixes bug #53983
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1593306 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
50ad48e746
commit
1a149050ee
@ -143,6 +143,12 @@ public class StringChunk extends Chunk {
|
||||
* and returns the string that that yields.
|
||||
*/
|
||||
protected static String parseAs7BitData(byte[] data, String encoding) {
|
||||
// Handle any encoding aliases, where outlook describes it differently
|
||||
if ("ansi".equals(encoding)) {
|
||||
encoding = DEFAULT_ENCODING;
|
||||
}
|
||||
|
||||
// Decode
|
||||
try {
|
||||
return new String(data, encoding);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
|
Loading…
Reference in New Issue
Block a user