Benedict-Carling/spanish-conjugator

Incorrect source/output encoding

Opened this issue · 0 comments

The encoding of strings is inconsistent, which leads to malformed output:

>>> from spanishconjugator import Conjugator as c  
>>> verb = c().conjugate('pasar', 'preterite', 'indicative', 'yo')
>>> verb
'pasé'

See also StackOverflow "Python – How do I convert an ASCII string into UTF-8?"

It appears the source code is actually UTF-8 encoded but wrongfully declared as iso-8859-15. In this specific case, the source code contains the bytes \xc3\xa9 which is é in UTF-8 but é in iso-8859-15.