Strange behavior while creating SMS with non-ASCII chars with mmcli

João M. S. Silva joao.m.santos.silva at gmail.com
Fri Mar 18 22:38:51 UTC 2016


Hi,

I have dedicated some time to this issue again. The problem is that 
creating an SMS with UTF-8 chars fails, no SMS is created.

I checked charset encoding all over the place: PHP, shell, etc. It all 
*seems* coherent.

If I create the SMS with mmcli in the command line it works.

If I create the SMS with mmcli from a bash script if fails. Other 
commands in the script, like -e and --simple-connect, work.

I've built the latest version 1.5.990 and added this code to the 
beginning of the main function:

gint
main (gint argc, gchar **argv)
{
     GDBusConnection *connection;
     GOptionContext *context;
     GError *error = NULL;

     gint i;
     for (i = 0; i < argc; ++i) {
         g_print("argv[%d] = %s\n", i, argv[i]);
     }

This is the result when the error occurs:

  argv[0] = /home/fidelio/mm/ModemManager-1.5.990/cli/.libs/lt-mmcli
  argv[1] = -m
  argv[2] = 4
  [Invalid UTF-8] argv[3] = --messaging-create-sms=text='Este \xe9 um 
texto com acentos em portugu\xeas, Jo\xe3o Silva',number=123456789

It looks like a strange [Invalid UTF-8] message is printed. Any hints?

-- 
João M. S. Silva


More information about the ModemManager-devel mailing list