-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
private static String fixHeaderEncoding(String val) {
byte[] bytes = val.getBytes(ISO_8859_1);
if (!looksLikeUtf8(bytes))
return val;
return new String(bytes, UTF_8);
}
This encoding conversion is wrong, you cannot restore the original binary content from a string without knowing its encoding.
Such conversion leads to loss of some characters.
Related references: https://stackoverflow.com/a/39308860
By the way: when will the next version be released?
Metadata
Metadata
Assignees
Labels
No labels