TinyGSM icon indicating copy to clipboard operation
TinyGSM copied to clipboard

Unicode SMS issue

Open kritonpc opened this issue 4 years ago • 3 comments

[x] I have read the Troubleshooting section of the ReadMe

What type of issues is this?

[ ] Request to support a new module [ ] Bug or problem compiling the library [ ] Bug or issue with library functionality (ie, sending data over TCP/IP) [x] Question or request for help

What are you working with?

Modem: SIM800L Main processor board: TTGO T-CALL TinyGSM version: 0.10.9 Code: modem.sendSMS_UTF16(SMS_TARGET, smsMessage, 9)

Scenario, steps to reproduce

I'm trying to send an SMS with Greek characters, and the message is passed as a variable, as it is not constant, using variable smsMessage. I tried using the UTF16 method, but I can't figure out how to convert a string to the desired value. When I pass the message directly to the function using modem.sendSMS_UTF16(SMS_TARGET, u"τεστ", 4), it works. So the problem is the way I will convert a string with greek characters to a format supported by this method

Expected result

Convert a string to utf16 and send an SMS with greek characters using variables

Actual result

I get chinese characters or @ characters and not my message

kritonpc avatar Jan 15 '21 11:01 kritonpc

i have the same issue, i cannnot cast string to char16_t.

marutichintan avatar Mar 23 '21 07:03 marutichintan

Has anyone found a solution to this?

ibouzikas avatar Dec 01 '23 08:12 ibouzikas

I get chinese characters after my message who can help? pleaseeeeeeeee

chaiyapojp avatar Dec 15 '23 08:12 chaiyapojp