buggnokii - Bugs: bug #23086, Cannot handle long lines (75+...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #23086: Cannot handle long lines (75+ characters)

Submitted by:  Victor Engmark <l0b0>
Submitted on:  Mon 28 Apr 2008 10:34:12 AM UTC  
 
Category: gnokiiSeverity: 3 - Normal
Item Group: major malfunctionStatus: Fixed
Privacy: PublicAssigned to: Daniele Forsi <dforsi>
Open/Closed: Closed

(Jump to the original submission Jump to the original submission)

Mon 15 Feb 2010 01:44:18 PM UTC, comment #12:

Sorry for the late reply. This indeed works fine now, and the bug can be closed. Thanks!

Victor Engmark <l0b0>
Wed 14 Oct 2009 01:40:44 PM UTC, comment #11:

(Resuming work on old bug)

> but the fix doesn't seem to work - In fact it imports even less of the NOTE line now.


the fix actually works, handling folding and unfolding and not overwriting innocent memory.
The amount of text you read in the phone is what remains after truncation to fit in the static space (60 bytes + NUL):
#define GN_PHONEBOOK_NAME_MAX_LENGTH 61
previously it was overflowing the array so you got more text.

In a Nokia 5300 the space for a text note is apparently 126 characters, how many can you store in your phone?

Note that I just pushed a mostly cosmetic change to avoid the bogus error message "Write failed (Data format is not valid.)" at end of file:
http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=2100186e907990e4e0c4cb13902cca4f2bd232c2 but this doesn't fix your problem.

Daniele Forsi <dforsi>
Project AdministratorIn charge of this item.
Sat 24 May 2008 06:43:39 PM UTC, comment #10:

Installed using
but the fix doesn't seem to work - In fact it imports even less of the NOTE line now. The test.vcf file is imported successfully, but the note text reads only
now. I also tried without literal "\n"s in the note, and then the text on the mobile phone reads only

Gnokii shell output:

(file #15723, file #15724)

Victor Engmark <l0b0>
Sat 24 May 2008 05:04:13 PM UTC, comment #9:

You also need the devleoper's files.
On Debian based distributions the package is libbluetooth-dev

Daniele Forsi <dforsi>
Project AdministratorIn charge of this item.
Sat 24 May 2008 02:54:56 PM UTC, comment #8:

autogen.sh helped, but now I don't get Bluetooth support:

What do I need to install? bluez-utils and bluez-gnome are already installed.

Victor Engmark <l0b0>
Sat 24 May 2008 11:58:16 AM UTC, comment #7:

You should install gettext package. /usr/share/aclocal/codeset.m4 containing AM_LANGINFO_CODESET is usually provided by gettext package.

Please also see autogen.sh script. It contains all commands to prepare sources to be compiled.

Pawel Kot <pkot>
Project Administrator
Sat 24 May 2008 10:07:01 AM UTC, comment #6:

I've tried installing the CVS version, but I keep getting errors. I followed the instructions on the web site and in the INSTALL file; here's the relevant shell output, with my comments preceded by "#":

Victor Engmark <l0b0>
Fri 23 May 2008 09:49:55 PM UTC, comment #5:

Please test the CVS version and if you still have problems give details on your phone model and the exact text of a note that is handled incorrectly.

With the fix I committed today the following vCard is written and read correctly (line folding exeggerated for testing purposes, and there's no end of line between "Note" and "5678..."):

BEGIN:VCARD
VERSION:3.0
FN:Test
N:Test
TEL;TYPE=PREF,VOICE:123
X-GSM-MEMORY:ME
X-GSM-LOCATION:1
X-GSM-CALLERGROUP:5
CATEGORIES:None
TEL;TYPE=VOICE:123
NOTE:Note 56789012345678901234567890123456789012345678901234567890123456789
0123456789
0123456789
0123456789
END:VCARD

Daniele Forsi <dforsi>
Project AdministratorIn charge of this item.
Fri 23 May 2008 08:30:16 PM UTC, comment #4:

Daniele already fixed reading in CVS. Writing vCards should be fixed soon.

Pawel Kot <pkot>
Project Administrator
Fri 23 May 2008 09:45:00 AM UTC, comment #3:

That's right. I can confirm it. The correct fix would be to switch to some real libvcard library. Currently we have just simple parsing of vcards done on our own.

Volunteers are very welcome.

Pawel Kot <pkot>
Project Administrator
Mon 19 May 2008 02:25:09 PM UTC, comment #2:

I'm not sure if I understand correctly. Could you attach sample vcard to this bug?

Pawel Kot <pkot>
Project Administrator
Mon 28 Apr 2008 10:37:09 AM UTC, comment #1:

The note should be like this:

Victor Engmark <l0b0>
Mon 28 Apr 2008 10:34:12 AM UTC, original submission:

I've tried to import some vCard files with "NOTE" lines longer than 75 characters (the limit according to RFC 2426, http://tools.ietf.org/html/rfc2426#section-2.6). If I do it according to the standard, by breaking the line at 75 characters and inserting a space, only the first line is imported. I.e., I've got the following contents (a-z replaced by "x"):
NOTE:XXXX xxxx\xXXX: xxxxxxx@xxxxxxx.xxx\xXxxxxx: xxxxxxx@xxxxxx.xx\xXxxxXx
xxx: xxxxxx
and only the first line is seen in the note on the phone.

I've also tried joining the lines by removing "\n " before importing. In this case, 76 (!) characters are imported, and the 77th character on the phone is a square. So I guess either Gnokii or the phone tries to act according to the standard, by refusing to import more than 75/76 characters per line.

Using version 0.6.22 on Ubuntu 8.04 (Hardy Heron).

Victor Engmark <l0b0>

 

Attached Files
file #15723:  test.vcf added by l0b0 (245B - text/x-vcard)
file #15724:  test2.vcf added by l0b0 (245B - text/x-vcard)
file #15681:  example.vcf added by l0b0 (251B - text/x-vcard - Here you go - Only the first 75 characters (including "NOTE:") are processed by Gnokii)
file #15538:  gnokiirc added by l0b0 (8KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by dforsi (Posted a comment)
  • -unavailable- added by pkot (Posted a comment)
  • -unavailable- added by l0b0 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 11 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 21 Feb 2010 04:59:27 PM UTCdforsiStatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
    Wed 14 Oct 2009 01:41:21 PM UTCdforsiStatusReady For Test=>Need Info
    Sat 24 May 2008 06:43:39 PM UTCl0b0Attached File-=>Added test.vcf, #15723
      Attached File-=>Added test2.vcf, #15724
    Fri 23 May 2008 09:49:55 PM UTCdforsiStatusConfirmed=>Ready For Test
    Fri 23 May 2008 08:30:16 PM UTCpkotAssigned toNone=>dforsi
    Fri 23 May 2008 09:45:00 AM UTCpkotStatusNeed Info=>Confirmed
    Mon 19 May 2008 02:40:16 PM UTCl0b0Attached File-=>Added example.vcf, #15681
    Mon 19 May 2008 02:25:09 PM UTCpkotStatusNone=>Need Info
    Mon 28 Apr 2008 10:34:12 AM UTCl0b0Attached File-=>Added gnokiirc, #15538

    Back to the top


    Powered by Savane 3.1-cleanup1