Strange behavior while creating SMS with non-ASCII chars

Aleksander Morgado aleksander at aleksander.es
Thu Oct 8 01:10:56 PDT 2015


On Thu, Oct 8, 2015 at 1:11 AM, João M. S. Silva
<joao.m.santos.silva at gmail.com> wrote:
> If I run this in the command line:
>
>   mmcli -m ${modem} --messaging-create-sms="text='ççç',number=${number}"
>
> the SMS is created correctly:
>
>   Successfully created new SMS:
>         /org/freedesktop/ModemManager1/SMS/1070 (unknown)
>
> but if I run this from a script, no SMS is created at all.
>
> This happens because of the 'ç' (c-cedilla). With a normal 'c' it has no
> problem, whether in the command line or script.
>
> Don't know if it is relevant but my locale is:
>
> $ locale
> LANG=en_US.UTF-8
> LANGUAGE=en_US:en
> LC_CTYPE="en_US.UTF-8"
> LC_NUMERIC=pt_PT.UTF-8
> LC_TIME=en_US.UTF-8
> LC_COLLATE="en_US.UTF-8"
> LC_MONETARY=pt_PT.UTF-8
> LC_MESSAGES="en_US.UTF-8"
> LC_PAPER=pt_PT.UTF-8
> LC_NAME=pt_PT.UTF-8
> LC_ADDRESS=pt_PT.UTF-8
> LC_TELEPHONE=pt_PT.UTF-8
> LC_MEASUREMENT=pt_PT.UTF-8
> LC_IDENTIFICATION=pt_PT.UTF-8
> LC_ALL=

This looks like a bug in your setup somehow. Is the script you're
running being run by your own user? Or maybe via crontab? or maybe via
some other user without proper locale settings? If the script file
itself is encoded in UTF-8 (is it?) and the locale settings of the
user running the script are in UTF-8 (like yours) then you shouldn't
have any issue.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list