gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Howto send Chinese SMS?


From: Allan Dyer
Subject: Howto send Chinese SMS?
Date: Fri, 23 May 2003 17:51:15 +0800

Hi

I'm using gnokii 0.5.0 to successfully send English SMS messages, both through 
the gnokii program and from Perl via the GSMI module.

I would like to send Chinese messages (preferably from Perl). I have the text 
as Unicode. I have not been able to figure out from the source of gnokii.c, 
Gnokii.c or the include file how I'm supposed to code the string, or tell the 
sendsms routine that it's getting UCS2 text.

I've tried many combinations, big-endian, little-endian, with or without an 
initial 0xfeff

>From the command prompt:
gnokii --sendsms 99999999 <msg-ucs.txt

where msg-ucs.txt contains my Unicode Chinese text.

Perl fragment:
use GSMI; 

  my $conn = GSMI-
>connect("driver=Gnokii;device=/dev/ttyS0;options=model:6150,connection:dau9p,in
itlength:1")
  my $smshash = {};
  $smshash->{'destination'} = $num;
  $smshash->{'message'} = $message;
#  $smshash->{'eightbit'} = 1;
  my $result = $conn->SendSMS($smshash);

(I tried adding the eightbit option after reading the Gnokii.c source, but it 
didn't help)

whatever I try the destination phone gets junk Latin-based characters 
(sometimes with many accented characters, sometimes with few, unaccented 
letters, and many gaps, sometime with every other character being a @.)

Any help would be appreciated.

Other information:
Phone: Nokia 6150
Connection: dau9p cable to ttyS0
OS: Slackware Linux, kernel version 2.2.17

Regards
Allan Dyer


--------------------------------------------------------------------
 Allan Dyer, CISSP, MHKCS, DFCAE | address@hidden
 Chief Consultant                | http://www.yuikee.com.hk/
 Yui Kee Computing Ltd.         |






reply via email to

[Prev in Thread] Current Thread [Next in Thread]