vshymanskyy / TinyGSM

A small Arduino library for GSM modules, that just works
GNU Lesser General Public License v3.0
1.94k stars 719 forks source link

Unicode SMS issue #482

Open kritonpc opened 3 years ago

kritonpc commented 3 years ago

[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

marutichintan commented 3 years ago

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

ibouzikas commented 9 months ago

Has anyone found a solution to this?

chaiyapojp commented 9 months ago

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