Operating system name and version: OpenSuSE 10.2
Version of smsd: 3.1.14
Smsd installed from: sources
Name and model of a modem / phone: hyuiawei e155
Interface: USB

Hi all!

As in subject: I have a problem sending sms with russian symbols in UTF8 encoding just after server reboot (or start, of course). But when I try "sms3 restart" all is ok until next server reboot.

For encoding used unicode2sms:
#!/bin/sh

# checkhandler for SMS Tools 3
# autoconverts cyrillic messages to UCS-2BE
# add checkhandler=/path/to/ucsautoconvert into global part of smsd.conf
# written by lexy (lexy@mrlexy.ru), 2008

FILE=`mktemp /tmp/smsd_XXXXXX`

if [ ! `grep '[А-Яа-я]' $1 > /dev/null` -o `grep 'Alphabet:\s*U' $1 > /dev/null` ]
    then exit 0
fi

cat $1 | awk '{if(NF==0) {s=1} if(s==0 && NF>0 && $0!~/Alphabet:[ \t]*U/){print}}' > $FILE
echo Alphabet: UCS2 >> $FILE
echo "" >> $FILE
cat $1 | awk '{if(NF==0) {s=1} if(s==1){print}}' | iconv -t UCS-2BE >> $FILE

mv $FILE $1
chmod 664 $1
'bash' Syntax Highlight powered by GeSHi



I noticed, that when it is NOT ok in sms file there is no data about unicode cyrillic symbols. In fact, when message contains latin symbols at the beggining of the message they always present, but when "it is NOT ok" there are no more symbols at the place where cyrillic symbols appear, even if there are more latin symbols after cyrillic ones.

So, I think, the subject is why it's different when smsd started at boot time and when I start it later with sms3 script.