gnokii-users
[Top][All Lists]
Advanced

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

Re: 5110: gnokii --writephonebook is broken; gnokii/xgnokii do not write


From: Christian Fughe
Subject: Re: 5110: gnokii --writephonebook is broken; gnokii/xgnokii do not write umlaute
Date: Sun, 9 Nov 2003 18:58:34 +0100 (CET)

Hi,

On Sun, 9 Nov 2003 address@hidden wrote:

> The patch I submitted before is not doing fine either! Using my patch
> for writing and reading I get the following result. The phone displays
> the string 'GüäöÜÄÖßnni' after writing which is ok, but returns the
> following wrong string on reading:
>
> ---snip---
> $ gnokii --getphonebook SM 4 -r
> GNOKII Version 0.5.5
> Gü?öÜ?Ö?nni;+491234567890;SM;4;0
> ---snip---
>

Reading the phonebook from the phone returns the good string, when I add the
following patch to the ones I supplied before. I apply all patches to
the sources from 'gnokii-0.5.5.tar.bz2'.

---snip---
--- gnokii-0.5.5.orig/common/phones/nokia.c 2003-11-05 00:28:00.000000000 +0100
+++ gnokii-0.5.5/common/phones/nokia.c       2003-11-09 18:32:47.000000000 +0100
@@ -110,12 +110,14 @@
        size_t i, j, n;
        unsigned char buf[16];

-       for (i = 0, j = 0; j < len; i += n, j++) {
-               n = char_uni_alphabet_decode(pnok_nokia_to_uni(src[j]), buf);
-               if (i + n >= max) break;
-               memcpy(dest + i, buf, n);
-       }
-       dest[i] = 0;
+//FUGHE        for (i = 0, j = 0; j < len; i += n, j++) {
+//FUGHE                n = char_uni_alphabet_decode(pnok_nokia_to_uni(src[j]), 
buf);
+//FUGHE                if (i + n >= max) break;
+//FUGHE                memcpy(dest + i, buf, n);
+//FUGHE        }
+//FUGHE        dest[i] = 0;
+        memcpy(dest, src, len);
+       dest[len] = 0;
 }

 size_t pnok_string_encode(unsigned char *dest, size_t max, const unsigned char 
*src)
---snip---


Regards,

Christian Fughe






reply via email to

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