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 | ad...@yuikee.com.hk
> Chief Consultant | http://www.yuikee.com.hk/
> Yui Kee Computing Ltd. |
>
>
>
>
> _______________________________________________
> gnokii-users mailing list
> gnokii...@nongnu.org
> http://mail.nongnu.org/mailman/listinfo/gnokii-users
>
--------------------------------------------------------------------
Allan Dyer, CISSP, MHKCS, DFCAE | ad...@yuikee.com.hk
Chief Consultant | http://www.yuikee.com.hk/
Yui Kee Computing Ltd. |
_______________________________________________
gnokii-users mailing list
gnokii...@nongnu.org
http://lists.nongnu.org/mailman/listinfo/gnokii-users