SMS Server Tools 3
This site is hosted by Kekekasvi.com
 Menu
Basic information:
Additional information:
Support:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

 Search
Custom Search

 Visitor locations
 
 SMS Server Tools 3 Community
Welcome, Guest. Please login or register. Sat May 25, 2024 11:05
SMSTools3 Community » Help and support Bottom

[answered] Accentuated character conversion with v.3.1.14

  This topic is locked

Page:  1

Author Post
Member
Registered:
Oct 2009
Location: Latvia
Operating system name and version: Linux Debian 2.6.32.13 PPC
Version of smsd: 3.1.14
Smsd installed from: sources
Name and model of a modem / phone: Nokia N30
Interface: serial with USB adapter...

I used the same approach like for older version:
[answered] Accentuated character conversion

It works well with incomming messages

But I got "Invalid alphabet" error.
I tried to not use conversion at all by setting format to ISO, but then I got message sent, but with wrong characters.
Does smsd checks for alphabet before checkhandler?
:?
Otherwise I can hardly explain why I am getting "Alphabet: UTF-8" after this line of my checkhandler:


Or I am doing something that I am missing...

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Janeks wrote
Does smsd checks for alphabet before checkhandler?

No it does not, because checkhandler may change the alphabet.

Janeks wrote
Otherwise I can hardly explain why I am getting "Alphabet: UTF-8" after this line of my checkhandler:


Or I am doing something that I am missing...

I assume that you had a working system 12 months ago, and moving to 3.1.14 caused this problem, right?

Can you show your current checkhandler, the original message file before placing it into the outgoing directory, and the same message from the failed directory?

Member
Registered:
Oct 2009
Location: Latvia
Topic owner
checkhandler:
#!/bin/bash

if [ "$1" == "RECEIVED" ]; then

  if sed -e '/^$/ q' < "$2" | grep "^Alphabet: UCS2" > /dev/null; then
      TMPFILE=`mktemp /tmp/smsd_XXXXXX`
      sed -e '/^$/ q' < "$2" | sed -e 's/Alphabet: UCS2/Alphabet: UTF-8/g' > $TMPFILE
      sed -e '1,/^$/ d' < "$2" | iconv -f UNICODEBIG -t UTF-8 >> $TMPFILE
      mv $TMPFILE "$2"
    fi
           
fi
                   
if [ "$1" == "SENT" ]; then
                   
    if sed -e '/^$/ q' < "$2" | grep "^Alphabet: UTF-8" > /dev/null; then
      TMPFILE=`mktemp /tmp/smsd_XXXXXX`
        sed -e '/^$/ q' < "$2" | sed -e 's/Alphabet: UTF-8/Alphabet: UCS2/g' > $TMPFILE
        sed -e '1,/^$/ d' < $2 | iconv -f UTF-8 -t UNICODEBIG >> $TMPFILE
        mv $TMPFILE $2
    fi
                           
fi
'bash' Syntax Highlight powered by GeSHi


orginal message:


failed message:


Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Your checkhandler looks like eventhandler. Remember that checkhandler and eventhandler are two different things with different arguments.

Use the checkhandler from this post from the previous topic and your message will be sent as expected.

Member
Registered:
Oct 2009
Location: Latvia
Topic owner
Ah, sorry, made the same mistake. For sent SMS file I need first argument $1 only. :roll:

BTW: I would recomend add arguments list description into "How to configure" page near each handler description.
That is the first place I looked to. In page http://smstools3.kekekasvi.com/index.php?p=eventhandler there was not exact desription about checkhandler arguments.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Janeks wrote
For sent SMS file...

For outgoing SMS file... ;)

Janeks wrote
BTW: I would recomend add arguments list description into "How to configure" page near each handler description.
That is the first place I looked to. In page http://smstools3.kekekasvi.com/index.php?p=eventhandler there was not exact desription about checkhandler arguments.

You are right, I have to think if I make some additions to the documentation. Currently argument for checkhandler can only be seen in sample codes...

  This topic is locked

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.