l0b0 / vcard

vCard 3 validator, class and utility functions
https://gitlab.com/victor-engmark/vcard
GNU General Public License v3.0
34 stars 8 forks source link

vcard end lines #1

Closed qurczak closed 13 years ago

qurczak commented 13 years ago

My vcard exported from android:

00000060  0a 45 4e 44 3a 56 43 41  52 44 0a 0a              |.END:VCARD..|
0000006c

Vcard vcard/test/maximal.vcf:

000003f0  0a 45 4e 44 3a 56 43 41  52 44 0d 0a 0d 0a        |.END:VCARD....|
000003fe

Where in file vcard_defs.py is defined and hard cored: CRLF_CHARS = CR_CHAR + LF_CHAR

I suggest you replace CRLF_CHARS with a constant to the function that detects what is the end of the current file and use it everywhere.

l0b0 commented 13 years ago

This would be against the vCard standard. It explicitly says the line separator is CRLF. Using anything else in a vCard therefore makes it an invalid vCard.