gnokii-users
[Top][All Lists]
Advanced

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

Re: gnokii + kaddressbook + encoding


From: Helge Deller
Subject: Re: gnokii + kaddressbook + encoding
Date: Mon, 31 May 2004 19:51:59 +0200
User-agent: KMail/1.6.52

On Wednesday 26 May 2004 10:36, Pawel Kot wrote:
> On Wed, 26 May 2004, Bostjan Muller wrote:
> 
> > I just recompiled kaddressbook with the gnokii suppport, and I can import
> > the entries directly from phone, but the encoding looks like the caracters
> > from the phone are read in latin1 charset (and they should probably be in
> > latin2 or utf8 - nokia 6210). Does anyone know how to persuade it to use
> > the correct charset?
> 
> Well, "it works for me". In the phone you have unicode encoding. libgnokii
> converts the output according to locale set. So you probably run
> kaddresbook (or rather KDE as a whole) with LC_ALL=C or similiar.

Yes, there was a bug in the gnokii im/export filter of kaddressbook, which I 
just fixed now in KDE CVS's HEAD.
Anyway, it seems that libgnokii still doesn't handle locale/unicode data 
correctly in:
  gn_sm_functions(GN_OP_WritePhonebook, &data, &state);

Let's say, that data.phonebook_entry.name contains the name "Jürgen Öhm" (with 
two umlauts) and the rest of the name field holds zeros, then gnokii stores the 
name correctly with the umlauts in the phone, but adds two more random 
characters.
It seems to be a relation between the number of umlauts and the number of added 
characters. I assume, that libgnokii does something wrong with the result of 
the strlen() functions (which does not correctly handles unicode input).
This happed both with SUSE's libgnokii 0.6.0 and gnokii's 0.6.1 CVS version.
Pawel, maybe you have any idea what could be wrong ?


Another thing:

The gnokii API was changed incompatible with gnokii-0.6.1 (CVS) from 
gn_cfg_read(char **bindir)   to  gn_cfg_read(char *filename, char **bindir);

Could you please either change it back and make it compatible again ?
Or, please add a GNOKII-specific numeric #define with which external apps might 
get a chance to choose the right functions.
E.g. please add 
+ #define GNOKII_VERSION 0x061
to include/gnokii.h ?

Helge





reply via email to

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