Index: common/gsm-encoding.c =================================================================== RCS file: /cvsroot/gnokii/gnokii/common/gsm-encoding.c,v retrieving revision 1.30 diff -u -r1.30 gsm-encoding.c --- common/gsm-encoding.c 30 Sep 2002 10:05:42 -0000 1.30 +++ common/gsm-encoding.c 26 Oct 2002 15:34:00 -0000 @@ -323,8 +323,8 @@ switch (length = mbtowc(dest, value, MB_CUR_MAX)) { case -1: dprintf("Error calling mctowb!\n"); - *dest = '?'; - return -1; + *dest = *value; + return 1; default: return length; } @@ -338,7 +338,8 @@ case -1: dprintf("Error calling wctomb!\n"); *dest = '?'; - return -1; + if (value <= 0xFF) *dest = value; + return 1; default: return length; } Index: common/phones/nk6510.c =================================================================== RCS file: /cvsroot/gnokii/gnokii/common/phones/nk6510.c,v retrieving revision 1.85 diff -u -r1.85 nk6510.c --- common/phones/nk6510.c 30 Sep 2002 10:46:22 -0000 1.85 +++ common/phones/nk6510.c 26 Oct 2002 15:34:08 -0000 @@ -1661,7 +1661,7 @@ static gn_error P6510_WritePhonebookLocation(GSM_Data *data, GSM_Statemachine *state) { - unsigned char req[500] = {FBUS_FRAME_HEADER, 0x0b, 0x00, 0x01, 0x01, 0x00, 0x00, 0x10, + unsigned char req[1000] = {FBUS_FRAME_HEADER, 0x0b, 0x00, 0x01, 0x01, 0x00, 0x00, 0x10, 0x02, 0x00, /* memory type */ 0x00, 0x00, /* location */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; /* blocks */ Index: gnokii/gnokii.c =================================================================== RCS file: /cvsroot/gnokii/gnokii/gnokii/gnokii.c,v retrieving revision 1.306 diff -u -r1.306 gnokii.c --- gnokii/gnokii.c 15 Oct 2002 10:18:20 -0000 1.306 +++ gnokii/gnokii.c 26 Oct 2002 15:34:16 -0000 @@ -3207,7 +3207,7 @@ if (argc && (strcmp("-i", args[0])) && (strcmp("-v", args[0]))) usage(stderr); - if (!strcmp("-v", args[0])) + if (argc && !strcmp("-v", args[0])) vcard = 1; Line = OLine; @@ -3217,7 +3217,7 @@ if (!vcard) { if (!GetLine(stdin, Line, MAX_INPUT_LINE_LEN)) break; - if (decodephonebook(&entry, OLine)) + if ((memory_type_string = decodephonebook(&entry, OLine)) == NULL) continue; } else { if (vcard2phonebook(stdin, &entry))