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

Unicode messages with Infobip #10

Open
Vilkku opened this issue Jan 16, 2015 · 0 comments
Open

Unicode messages with Infobip #10

Vilkku opened this issue Jan 16, 2015 · 0 comments

Comments

@Vilkku
Copy link

Vilkku commented Jan 16, 2015

Currently messages sent with Infobip do not support UFT-8.

According to the Infobip API specification

UNICODE messages can be sent either by converting message text into hexadecimal representation and inserting that content into binary tag or by inserting unconverted UNICODE text into text tag. In case when you’re inserting unconverted UNICODE text you have to relay “Content-Encoding:UTF-8” information in the header when submitting messages using HTTP POST. No matter which method you use to submit UNICODE messages you always have to set DataCoding=8 parameter.

The DataCoding parameter is hardcoded to 3 in InfobipGateway.php line 76. In addition to that, the text is decoded on line 80 in the same file.

By modifying the file file (DataCoding to 8 and removing the utf8_decode function call) unicode messages are sent successfully. However, it might be useful to let the user choose which method to use - because of this I have not submitted this as a pull request.

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

1 participant