text-vcard
text-vcard copied to clipboard
vCard 2.1 exported from Palm OS is not parsed
I got an error
Wide character in subroutine entry at /usr/local/lib/perl5/site_perl/Text/vCard/Node.pm line 134.
while trying to read vCard file from Palm OS.
File encoding is cp-1251, my code is
my $address_book = vCard::AddressBook->new(encoding_in => 'cp1251', encoding_out => 'cp1251');
$address_book->load_file('./test.vcf');
Value in vCard has ENCODING=QUOTED-PRINTABLE but also contains characters in cp1251.
Currently vCard first converted from cp1251 to utf-8 and than QUOTED-PRINTABLE is decoded. to fix this problem QP should be decoded and than result string converted from cp1251 to utf-8.
I can share test vCard if need.
If QUOTED-PRINTABLE is applied to all 8bit characters, than other problem is seen: after decoding QP string is not converted from encoding_in to utf8.