Replace Unicode characters with ASCII equivalents on paste #1122
Replies: 3 comments
-
Interested to see how this gets dealt with. There are some nuances, eg. for "rich" channels like FB messenger and WhatsApp, you probably want the unicode characters, but for SMS channels, you probably don't. (but there are also special characters in the GSM character set, that are not in ASCII, complicating the matter) In case it helps, for our projects where we never want to send any unicode, we pass message content through https://pypi.org/project/Unidecode/ |
Beta Was this translation helpful? Give feedback.
-
Yeah definitely open to debate here. The thinking behind the original ticket was that users are copy and pasting stuff from something like Word and don't realise they're including characters which might cut the message length in half. So one option would be to do these replacements only on paste, and then let users re-add whatever characters they want. Another option would be to just inform the user that the message contains non-GSM characters: #745 (comment) |
Beta Was this translation helpful? Give feedback.
-
Another angle to this is that users sometimes end up with these quotes inside expressions and then the expression fails to evaluate. |
Beta Was this translation helpful? Give feedback.
-
For example:
To reduce chances of message needing to be sent as Unicode
Beta Was this translation helpful? Give feedback.
All reactions