Open niktses opened 4 years ago
Hmm from my first tests it seems to be working 🤔
Could you provide an example line of text that you are trying to encode?
String greekText = "αβγδεζηθικλμνξοπρστυφχψωΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ€"; String encoding = "ISO-8859-7"; var encoded = await CharsetConverter.encode(greekText);
I found that αβγδεζηθικλμνξοπρστυφχψωΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ
works. The problem is in the Euro sign, which wasn't present on ISO-8859-7 originally (was added in 2003) and the formal version is from 1987. Some sites doesn't include the Euro sign.
x-mac-greek
does encode. but Euro sign is 156, where it should be 164. Damm you Apple.
I think the only way is to actually handle those by yourself - in the end thats only 3 characters to map. I may add some code later to handle those special cases. Thanks for reaching out!
String encoding = "ISO-8859-7"; var encoded = await CharsetConverter.encode(encoding, line.text);
No matter the encoding used i get this error on ios. Android works fine.
PlatformException(encoding_failed, Encoding failed, reason unknown, null, null)