From 58b7a5a1c79e6412bbfe7da249110862fe50160b Mon Sep 17 00:00:00 2001 From: Alexander Chernoskutov Date: Tue, 3 Dec 2019 19:45:07 +0500 Subject: [PATCH] update example: UTF8 SMS --- examples/AllFunctions/AllFunctions.ino | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/examples/AllFunctions/AllFunctions.ino b/examples/AllFunctions/AllFunctions.ino index 7a8fb99..7164086 100644 --- a/examples/AllFunctions/AllFunctions.ino +++ b/examples/AllFunctions/AllFunctions.ino @@ -239,8 +239,15 @@ void loop() { DBG("SMS:", res ? "OK" : "fail"); // This is only supported on SIMxxx series - res = modem.sendSMS_UTF16(SMS_TARGET, u"Привіііт!", 9); - DBG("UTF16 SMS:", res ? "OK" : "fail"); + res = modem.sendSMS_UTF8_begin(SMS_TARGET); + if(res) { + auto stream = modem.sendSMS_UTF8_stream(); + stream.print(F("Привіііт! Print number: ")); + stream.print(595); + res = modem.sendSMS_UTF8_end(); + } + DBG("UTF8 SMS:", res ? "OK" : "fail"); + #endif #if TINY_GSM_TEST_CALL && defined(CALL_TARGET)