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

Messages still being wrongly sent in unicode even when are valid in gsm8 #159

Closed
aseques opened this issue Dec 19, 2013 · 4 comments
Closed
Milestone

Comments

@aseques
Copy link
Contributor

aseques commented Dec 19, 2013

After #154, the messages are converted first to gsm8 (as they should) but then being sent still in double byte format

For example "à" results in "00 7f" while it should be "7f"

This happens at least in kannel, may it be that there is a function that decides this double byte encoding?

@aseques
Copy link
Contributor Author

aseques commented Dec 19, 2013

It seems that the problem is in this line https://github.com/antonraharja/playSMS/blob/master/web/plugin/gateway/kannel/fn.php#L52

                if (function_exists('mb_check_encoding')) {
                        if (mb_check_encoding($sms_msg,"UTF-8")){
                                $URL .= "&charset=UTF-8&coding=2";
                                logger_print("unicode autodetected", 3, "kannel outgoing");
                        }
                }

Since the unicode flag is already send, I would drop this piece of code entirely (the other option would be to check here for gsm8 characters too.

@antonraharja
Copy link
Member

you're right it was double bytes, so that code clearly a problem as well
thought it wasn't

try to remove and test, if its OK pull request the new one to fix this one, thanks

@aseques
Copy link
Contributor Author

aseques commented Dec 19, 2013

Tested and working

@dvoryanchikov
Copy link
Contributor

not working
unicode flag is not sent if all text of message is gsm but footer has unicode characters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants