thesanjeetc / SiriControl-System

Control anything with Siri voice commands.
https://medium.com/@thesanjeetc/bae98aceb586
MIT License
223 stars 46 forks source link

Message encoding breaks on accented letters #4

Open flesler opened 7 years ago

flesler commented 7 years ago

Tested it on spanish:

Said probando otra cosa más Script received: probando otra cosa m=c3=a1s=

I don't know if it never actually uses utf-8 which is assumed by the script or rather it depends on the phone. You might be able to detect encoding (?)

somlioy commented 6 years ago

Changing line 90 in SiriControl.py from:

    return str(voice_command.get_payload()).lower().strip()

to

    return str(voice_command.get_payload(decode=True)).lower().strip()

Fixed the issue for me with letters such as æ. ø and å.

You also might need to add # -*- coding: UTF-8 -*-

On top of corresponding module-files.