Updated text decoding to fallback to ISO-8859-1.

See #20 for more details.
This commit is contained in:
David Howden
2016-05-09 22:37:19 +10:00
parent 1c1d74b935
commit bfba4b35ab
+2 -2
View File
@@ -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
}
}