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. Sun Oct 25, 2020 17:22
SMSTools3 Community » Help and support Bottom

[answered] How to save "sent" in readable form ?

Login and Post Reply

Page:  1

Author Post
Member
Registered:
Mar 2011
Location: Russian Federation
Sent messages are stored in specified folder but text part of the messages are encoded to UNICODEBIG. I would like to save text of the message in UTF-8 for reading in mc. Also I need to keep readable sms headers (To, Alphabet, Modem, e.t.c.)

How to do this ?

Is any way to do 'iconv -f UNICODEBIG -t UTF-8' to text of the messages ?

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
The following script might work as an eventhandler. Take it as example, I have not tested it, just found some code and made minor modifications..

#!/bin/bash

if [ "$1" == "SENT" ]; 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
 
'bash' Syntax Highlight powered by GeSHi


Member
Registered:
Mar 2011
Location: Russian Federation
Topic owner
keke wrote
The following script might work as an eventhandler. Take it as example, I have not tested it, just found some code and made minor modifications..




Thanks. Seems works.

Login and Post Reply

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.