[Top][All Lists]

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

multibyte characters and writing calendars

From: Carles Pina i Estany
Subject: multibyte characters and writing calendars
Date: Sun, 23 Mar 2008 22:13:51 +0100
User-agent: Mutt/1.5.17 (2007-11-01)


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

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.

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".

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 :-)

Thank you,

Carles Pina i Estany            GPG id: 0x8CBDAE64       Manresa - Barcelona

Attachment: utf8ascii.patch
Description: Text Data

reply via email to

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