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:03 +10:00
parent 1c1d74b935
commit bfba4b35ab

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
}
}