gnokii-users
[Top][All Lists]
Advanced

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

Re: multibyte characters and writing calendars


From: Pawel Kot
Subject: Re: multibyte characters and writing calendars
Date: Tue, 25 Mar 2008 10:36:34 +0100

Hi,

On Sun, Mar 23, 2008 at 10:13 PM, Carles Pina i Estany <address@hidden> wrote:
>  I use gnokii in that way:
>  gnokii --deletecalendarnote 1 end
>  gnokii --writecalendarnote
>  /home/carles/.kde/share/apps/korganizer/std.ics 1 end
>
>  The problem: std.ics is a UTF8 file, and appointments that uses some
>  multi-byte characters in UTF8 are not correctly written to my mobile
>  (Nokia 6234).
>
>  I made a patch for Gnokii, but maybe is not the correct way. Patch is
>  attached.

It seems that you don't use iconv. At least changes in your patch
indicate that. I wonder why. I think all modern unix-type systems
(Linux, *BSD, OpenSolaris) use iconv these days.

>  Now I'm calling utf8_decode after read the ICS file and sending to
>  gnokii. It works fine.
>
>  Maybe would be better to call utf8_decode just before sending the
>  text (depending of the mobile driver?) and have UTF8 in all process.
>
>  Because until now nobody is guaranting that the ICS file is UTF8 I feel
>  quite confident that converting to ASCII is not a big problem and even
>  should be done before when writecalendarnote was implemented.

So you convert UTF-8 sequence to ascii, right? What encoding does your
phone use? Looking at the model that should be unicode so we should
convert to unicode, not ascii in such case.

>  Ah! In my system, gnokii is not using iconv library. I think that,
>  maybe, if gnokii would use libiconv I would not need to implement my
>  UTF8 to ASCII "parser".

Yeah. See the question above. I wonder what is the reason for that.

>  I think that maybe patch is not very easy to read (in the utf8_decode).
>  It's doing two tables with the equivalent ASCII characters, and checking
>  the limits to avoid that non-valid UTF8 would crash the program. I could
>  split in another function, but well, I think that gnokii people is used
>  to read some rare-bytes coding :-)

take care,
pkot
-- 
Pawel Kot




reply via email to

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