Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change encoding #23

Closed
mseld opened this issue Nov 12, 2017 · 1 comment
Closed

change encoding #23

mseld opened this issue Nov 12, 2017 · 1 comment

Comments

@mseld
Copy link

mseld commented Nov 12, 2017

i need to change Default encoding latin1
something like below
smpp.encodings.default = 'LATIN1';

@lillem4n
Copy link
Member

Hm, this is actually much harder that it appears at a first glance.

Standard SMS:es are using ASCII-ish encoding (GSM 03.38, https://en.wikipedia.org/wiki/GSM_03.38) and when a character is entered that is not supported by GSM 03.38, it needs to use UCS-2 (https://en.wikipedia.org/wiki/GSM_03.38#UCS-2_Encoding) and that is kind of a fixed width UTF-16.

I'd strongly advise against sending SMS:es with Latin encoding all together. Convert the string to UTF8 before sending to the library and let it do the rest of the conversions for you.

@lillem4n lillem4n closed this as completed Jan 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants