Skip to content

Updated Message->containsUnicode() to detect the GSM 03.38 Basic Character Set#13

Merged
vood merged 1 commit intoConnectCorp:masterfrom
quinncomendant:unicode
Sep 8, 2015
Merged

Updated Message->containsUnicode() to detect the GSM 03.38 Basic Character Set#13
vood merged 1 commit intoConnectCorp:masterfrom
quinncomendant:unicode

Conversation

@quinncomendant
Copy link
Copy Markdown
Contributor

Nexmo claims to be able to support the GSM 03.38 Basic Character Set http://unicode.org/Public/MAPPINGS/ETSI/GSM0338.TXT in text (not unicode) messages. Here, I've changed this method to test specifically for these. The old method fails because:

  • many of these characters' codepoints are greater than ASCII value 127
  • the ord() and str_split() functions do not reliably handle multibyte characters

…ich are outside the GSM default character set.

Nexmo claims to be able to support the GSM 03.38 Basic Character Set <http://unicode.org/Public/MAPPINGS/ETSI/GSM0338.TXT> in text (not unicode) messages. Here, I've changed this method to test specifically for these. The old method fails because many of these characters are outside the normal ASCII range, and because the characters cannot be converted safely using ord() and str_split().
vood added a commit that referenced this pull request Sep 8, 2015
Updated Message->containsUnicode() to detect the GSM 03.38 Basic Character Set
@vood vood merged commit c7cc689 into ConnectCorp:master Sep 8, 2015
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

Successfully merging this pull request may close these issues.

2 participants