Author |
Post |
|
#1 Wed Apr 26, 2017 09:27, 92 months ago.
|
Member
Registered: Apr 2017
Location: Russian Federation
|
Hi! Me again. Installed smstools 3.1.20 System - FreeBSD 11, RPi 1. Sending sms in cyrillic (Russian). Fails in sendsms script, as I can understand. I think, that it should use UCS-2BE instead of UCS for Russina SMS HEre is the log
|
|
#2 Wed Apr 26, 2017 09:52, 92 months ago.
|
Member
Registered: Apr 2017
Location: Russian Federation
Topic owner
|
For information - eventhandler just invokes /usr/local/bin/sendsms 7916******* "Вот такой вопроÑ" That's it, there is no any conversion in eventhandler. I tracked code in /usr/local/bin/sendsms to iconv and it seems to fail somewhere in $TEXT convert.
|
|
#3 Wed Apr 26, 2017 13:23, 92 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
You are running sendsms as root, and root's locale is 'C', not UTF-8.
It is said that root's locale should not be changed, so you could run smsd as unprivileged user and set it's locale to UTF-8. Or, edit the script sendsms and add -f UTF-8 argument to both iconv calls:
if $ECHO -n "$TEXT" | iconv -f UTF-8 -t ISO-8859-15 2>&1 | grep "invalid" > /dev/null; then
$ECHO -n "$TEXT" | iconv -f UTF-8 -t UNICODEBIG >> $TMPFILE
|
|
#4 Wed Apr 26, 2017 13:24, 92 months ago.
|
Member
Registered: Apr 2017
Location: Russian Federation
Topic owner
|
Thank you!
Going to try.
That was not obvious for me
|
|
#5 Wed Apr 26, 2017 20:33, 92 months ago.
|
Member
Registered: Apr 2017
Location: Russian Federation
Topic owner
|
Worked like a charm, thank you!
|