bugGNUstep Application Project - Bugs: bug #53290, [Addresses] Cannot import VCF files

 
 

bug #53290: [Addresses] Cannot import VCF files

Submitter:  Yavor Doganov <yavor>
Submitted:  Mon 05 Mar 2018 05:51:11 PM UTC
   
 
Category:  Library/Framework Severity:  3 - Normal
Item Group:  Bug Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 02 Jan 2022 11:21:49 AM UTC, comment #3: 

I am unsure either.  IIRC the fix was in ADVCFConverter.m (checking _idx which was causing the exception).  I don't remember exactly, but I believe I thought giving preference to UTF-8 is necessary for efficiency (nowadays it's more likely a .vcf file to be UTF-8).  Checking the code now, it seems it was really necessary because -initWithData:encoding: with NSUnicodeStringEncoding used for UTF-8 or ISO-8859 string will not return nil but garbage.  The attached little program demonstrates this.  So the "if (string)" check is insufficient.



(file #52598, file #52599, file #52600)

Yavor Doganov <yavor>
Sat 01 Jan 2022 09:14:28 PM UTC, comment #2: 

I am unsure this fix is generally correct - sure it gives precedence to UTF8, so it probably fixes your case which has an UTF8 file. But all encodings type are tested - it seems to me then that something valid is initialized even if the encoding is not correct?
What encoding is your file?

Riccardo Mottola <rmottola>
Group administrator
Tue 06 Mar 2018 05:58:04 AM UTC, comment #1: 

The attached patch fixes it for me.

(file #43473)

Yavor Doganov <yavor>
Mon 05 Mar 2018 05:51:11 PM UTC, original submission:  

AddressManager (and adtool) cannot import .vcf files from Evolution or KAdrressBook, in fact it can't import even its own exported files.

2018-03-05 19:46:14.189 adtool[16790:16790] File in NSUnicodeStringEncoding
2018-03-05 19:46:14.191 adtool[16790:16790] Syntax error in line 0!

Yavor Doganov <yavor>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #52598:  test.m added by yavor (539B - text/x-objcsrc - Test program with 2 files in different encodings)
file #52599:  iso.txt added by yavor (7B - text/plain - Test program with 2 files in different encodings)
file #52600:  utf.txt added by yavor (8B - text/plain - Test program with 2 files in different encodings)
file #43473:  vcf-import.patch added by yavor (1KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rmottola (Posted a comment)
  • -email is unavailable- added by yavor (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-01-02 yavor Attached File- Added test.m, #52598
        Attached File- Added iso.txt, #52599
        Attached File- Added utf.txt, #52600
    2018-03-06 yavor Attached File- Added vcf-import.patch, #43473

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code