Updated text decoding to fallback to ISO-8859-1.
See #20 for more details.
This commit is contained in:
parent
1c1d74b935
commit
bfba4b35ab
@ -337,8 +337,8 @@ func decodeText(enc byte, b []byte) (string, error) {
|
||||
case 3: // UTF-8
|
||||
return string(b), nil
|
||||
|
||||
default:
|
||||
return "", fmt.Errorf("invalid encoding byte %x", enc)
|
||||
default: // Fallback to ISO-8859-1
|
||||
return decodeISO8859(b), nil
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user