I finally got a chance to look further into this.
The contacts import process has a few problems when dealing with CSV
files. CSV files can contain line breaks in a "Notes" field for a
contact, but import() in /program/lib/Roundcube/rcube_csv2vcard.php
splits on line breaks and then attempts to parse each line individually.
As a result, the first contact that contains a line break in the CSV
file causes subsequent contacts to be skipped up until the stars are in
alignment several contacts further down the file.
Also, explode_quoted_string() in /program/lib/Roundcube/rcube_utils.php
doesn't seem to do proper range checking for strings beginning with a ".
It's making PHP complain, but doesn't seem to be affecting the output.
The "type=main" issue I originally reported is caused by an entry at the
top of rcube_csv2vcard.php, where field mappings are listed. There are a
couple of TODO notes next to several field mappings, including the
second and third email addresses -- which is why the type setup is a
little bit screwy.
So, CSV contacts import from Office 2010 is pretty icky. Most imported
contacts should be expected to be missing data.
If you guys are cool with me chewing on this, then: I'll update to
0.9.3; double-check the field mappings against Office 2010 UI; re-factor
the CSV file parsing code to treat it as a stream and maintain quoted
state and all that good stuff; set up a Github account; do a pull
request, which I've never done before, so probably I'll be a little bit
of a pain in the ass.
Is that all copacetic?
- R.
---
[__ Robert Sheldon
[__ No Problem
[__ Information technology support and services
[__ (530) 575-0278
_______________________________________________
Roundcube Development discussion mailing list
[email protected]
http://lists.roundcube.net/mailman/listinfo/dev