When attempting to import an Outlook Express generated vcard containing danish characters it does not import data properly (please see attached screenshot).
If I take the vcard file and use the Ultraedit (texteditor) functionality Convert ASCII to UTF8 the file is imported correctly. When I attempt to manully convert the lines in the vcard file in PHP (include/vcard.php) with code like this:
the textual string in the line variable does seem to become UTF-8 however and the generated query in SugarBean.phpCode:if (mb_detect_encoding($line, "auto") == "ASCII") { $line = mb_convert_encoding($line, "UTF-8", "ASCII"); }
looks correct:
INSERT INTO contacts SET id=\'54090e76-2b4a-15a3-349e-4a3e8db254f9\',
date_entered=\'2009-06-21 19:46:01\', date_modified=\'2009-06-21 19:46:01\',
modified_user_id=\'1\', created_by=\'1\', deleted=\'0\',
assigned_user_id=\'1\', first_name=\'Søren\', last_name=\'Østergård\',
title=null
when running the query manually through a query editor it works fine.
Please note that the attached vcard has been compressed using 7zip since normal zip does not allow some characters in filenames
Any help is greatly appreciated.
Regards
Kenneth Thorman


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks