gnokii-users
[Top][All Lists]
Advanced

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

Re: Howto send Chinese SMS?


From: Allan Dyer
Subject: Re: Howto send Chinese SMS?
Date: Thu, 10 Jun 2004 17:42:00 +0800

Thanks - a bit belated, but thanks. (in the context of my previous message, "a 
while" is a year and an OS re-installation). I'm now able to send and get SMS 
messages in Chinese correctly, if I set an appropriate locale - using the 
LC_ALL environment variable for gnokii (version 0.6.1) or setlocale in Perl.

However, "appropriate locale" is a fudge:
I can set zh_TW.big5 and read Traditional Chinese messages from the phone in 
the Big5 character set,
or
I can set zh_CN.gb2312 and read Simplified Chinese messages from the phone in 
the GB2312 character set
but if I set zh_TW.big5 and try to read a Simplified Chinese message, or vica-
versa, I get nothing, or question marks. The fix is to choose a locale with 
utf8 encoding, I don't have a Chinese local with utf8 encoding available, so I 
choose en_IN.utf8 (is that an Indian version of English?) and I can then read 
both the Traditional and Simplified messages, encoded in utf8.

The thing that seems counter-intuitive, or even just wrong, to me is that 
locales always have a language, so I'm specifying the language of the message I 
am asking to read - but I don't know the language. It would make sense if 
gnokii was going to do natural language translation, and present the message to 
me in the language I desire, but that is not the case: I am, in fact, guessing 
the language that the sender of the message used, before I know who the sender 
is. I have no sure way of telling whether I guessed wrong, or if the sender 
intended to send me "????".

What I have works, but lying about the language I want is ugly, is there a way 
of saying, "forget about the locale, just give me the Unicode"?

Regards
Allan Dyer

On 24 May 2003 at 0:05, Allan Dyer wrote:
> On 23 May 2003 at 15:37, Pawel Kot wrote:
> > On Fri, 23 May 2003, Allan Dyer wrote:
> > 
> > > 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.
> > 
> > Did you set correct locale? gnokii will do conversion for you.
> 
> No, I haven't used locale before. I've just checked, and found that I have 
> locale installed, but apparantly without any locations defined! It will take 
> me 
> a while to fix that & see if it works.
> 
> Regards
> Allan
> 
> 
> --------------------------------------------------------------------
>  Allan Dyer, CISSP, MHKCS, DFCAE | address@hidden
>  Chief Consultant                | http://www.yuikee.com.hk/
>  Yui Kee Computing Ltd.         |
> 
> 
> 
> 
> _______________________________________________
> gnokii-users mailing list
> address@hidden
> http://mail.nongnu.org/mailman/listinfo/gnokii-users
> 



--------------------------------------------------------------------
 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]