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 May 19, 2024 21:16
SMSTools3 Community » Help and support Bottom

[answered] Why not send sms with UCS/UNI/CHI Alphabet correctly?

  This topic is locked

Page:  1

Author Post
Member
Registered:
Sep 2009
Location: China
hi,

i have create a sms file with Alphabet has the value "UCS2",and i add some chinese characters as sms body.I can send it successfully,but when i check it in Mobile ,it is not my except.It looks like i didn't choose the right file format for the sms file .did i miss anythig? thank



this is my smsd.conf:



« Last edit by hankchan on Mon Sep 07, 2009 02:48, 178 months ago. »
Member
Registered:
Sep 2009
Location: China
Topic owner
It is strange that if i send this sms file to myself , i can see the correct chinese characters in the incoming folder.but if i check the sms in my mobile inbox , it just display messy code.can anyone give me some suggesting?

Member
Registered:
Sep 2009
Location: China
Topic owner
this is the test sms file :


Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Your message text is created using UTF-8 and it should be converted to the Unicode (Big Endian). Current version of smsd does not do this automatically.

Define a checkhandler script with the following content:
#!/bin/bash

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


Member
Registered:
Sep 2009
Location: China
Topic owner
keke,thank you very much . i have solve the problem ,and i will try your script later . i did it as follow:



Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
If you are receiving messages written with Chinese alphabet, you might try this script as an eventhandler:

#!/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
 
'bash' Syntax Highlight powered by GeSHi


  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.