Issue about character encoding!

zuliasro
Сообщения: 2

Issue about character encoding!

Сообщение#1 » 05.02.2018, 14:26

Hi there,

I tried to use your sms-reg system but unfortunately I got a lot of bad SMS replies, there is a serious issue about the character encoding.
Here is some examples, what I talking about:
1,
API result: {"tzid":"40317651","phone":"380985530336","service":"other","status":"TZ_OVER2_OK","msg":"6\u0443TJN2 is y\u043eur FastMail verifi\u0441ati\u043en c\u043ede"}
Website result: 6уTJN2 is yоur FastMail verifiсatiоn cоde | 6уTJN2 is yоur FastMail verifiсatiоn cоde

2,
Website result: 05.02.2018 12:07 380975728560 T4р9кG is уоur FastMail verificatiоn cоde | T4р9кG is уоur FastMail verificatiоn cоde (here is the "k" is a cyrillic "к")

3,
Website result: 05.02.2018 12:04 380984022864 LG5кWN is yоur FastMail vеrificatiоn соde | LG5кWN is yоur FastMail vеrificatiоn соde (the same as 2,)

The smallest problem is: Your system charge me for this unusable results.
The biggest problem: I already made a program, I planned to use your service, but unfortunately I can't while I got a lot of errors.

Could you check please and update?

PS.: If you take a closer look to my account you will see, there is a lot of wrong results.

Have a nice day, looking for your update.

Аватара пользователя
NetWatcher
Site Admin
Сообщения: 1092

Re: Issue about character encoding!

Сообщение#2 » 05.02.2018, 14:50

API answer is returned in json format.
Due to json specification if it contain cyrillic symbols - they are encoded to unicode
for example cyrillic "c" will be \u0441

So this issue is caused by your sender that mixes different symbols
Try to use some decoding functions in your software
(something like that https://stackoverflow.com/questions/110 ... convert-it)

zuliasro
Сообщения: 2

Re: Issue about character encoding!

Сообщение#3 » 06.02.2018, 05:24

Thank you for your quick answer, I agree with you, but unfortunately we talking about two different issue.
My issue is: Returning cyrillic character in an ASCII answer!

More details:
- I use an English language website (fastmail.com (based in Australia)) to insert SMS phone number and request SMS code
- I use US VPN for the connection
- I have English language OS

In this case I ask you, how is possible to inserted cyrillic characters into returned SMS please?
They use ASCII character table, the code input isn't case sensitive.

Example (from my previous post):
LG5кWN ---> this is the returned answer from YOUR system, isn't work
LG5kWN ---> this is converted manually to ASCII (use a lower case "k" character from ASCII table), this is work

Unfortunately NOT every SMS answer wrong, but frequently.

Please check, if you don't believe me and fix the issue.

Thank you!

Аватара пользователя
NetWatcher
Site Admin
Сообщения: 1092

Re: Issue about character encoding!

Сообщение#4 » 06.02.2018, 11:52

We have checked that.
You must understand that we just show text that incomes in sms. We do no conversions.

Your sender (fastmail.com) specially replaces some symbols with cyrillic.
Sure they think that invented such kind of "protection" against automatic registrations.
Because when you are "alive" user and type code from phone screen then you will type "к" as "k" but program will fail.

So this issue entirely depends on your sender and we just transfer codes as they come from your sender.
Our system works correct.

Вернуться в «Вопросы и поддержка по работе сервиса»

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и 2 гостя

cron