Closed OE8HSR closed 7 years ago
UCS-2 probably doesn't cover the emoji range
thank you for the fast answer. is there a way i can catch that exception so that the script doesnt shuts down? it would be no problem when messages with that kind for "characters" would be thrown away...
could you please give me a hint where in the module the problem occurs? i have searched alot today but i havent found it.
best wishes and thanks alot Hans
Try print(formatstring.encode('utf-16', errors='replace'))
This way the invalid codepoints will be replaced, so that the string can be printed in your environment. Or set your environment to use UTF-8.
thank you for your fast answer. i will try that. honestly i never thought that someone was using emojies in APRS messages but there are more than you would guess :)
best wishes hans
Closing this as it looks resolved
hello. i am new to this so please forgive me if i am doing something wrong.
i wanted to write a script that receives aprs messages and working with them. i encountered a problem when a message comes in that contains emojies.
the error message is:
is there any solution to this problem? i tried to filter these messages out but i noticed that it fails before i can filter the message...
thanks alot Hans