On Mon, Sep 08, 2008 at 11:20:16PM -0700, Adam Williamson wrote:
> The Blackberry outputs phone number lines like this:
> 
> TEL;work:6048359373
> 
> whereas when I sync a contact from a WM device it looks like this:
> 
> TEL;WORK;VOICE:(425) 1657643

Hi Adam,

The phone number may have its own format, but that doesn't sound like
the problem you're seeing.

You may wish to check the headers of the vcard data.  Barry's plugin
uses vCard version 3.0.  It looks like the WM plugin is using version 2.1,
according to the format examples above.  I would consider this opensync's
job to convert between them.


> so I took the blackberry files and used sed to transform the phone
> number lines into the format WM apparently likes - uppercasing the words
> and adding VOICE to each entry. I then sync'ed the modified files to the
> WM phone and voila, the phone numbers showed up.
> 
> It's not just the 'voice' keyword, as adding that to the Blackberry
> files in lower case was not enough. It was only when I then changed them
> to upper case that it worked. So it's either a combination of the voice
> keyword and the case issue, or just the case issue (I didn't bother
> trying *with* upper case but *without* the voice keyword to confirm).

According to the vCard 2.1 spec at http://www.imc.org/pdi/vcard-21.txt,
it says:

        All literal property names are valid as upper, lower, or mixed case.

According to the vCard 3.0 spec at http://tools.ietf.org/html/rfc2425,
it says:

        Type names and parameter names are case insensitive (e.g., the type
        name "fn" is the same as "FN" and "Fn"). Parameter values MAY be case
        sensitive or case insensitive, depending on their definition.

Also, http://tools.ietf.org/html/rfc2426 says:

        tel-type     = "HOME" / "WORK" / "PREF" / "VOICE" / "FAX" / "MSG"
                / "CELL" / "PAGER" / "BBS" / "MODEM" / "CAR" / "ISDN"
                / "VIDEO" / "PCS" / iana-token / x-name
        ; Values are case insensitive

Examples of "voice" in the version 3.0 spec are in both cases, while
all the examples in version 2.1 are in upper case.  Also, the syntax is
different for the TEL field... version 2.1 just sticks VOICE in the
format, while version 3.0 uses a "TYPE=voice" syntax.

So..... I would make sure that both plugins are reporting their data
as the proper version.  Barry reports its vcard data as version 3.0 as
expected.  If the versions are being reported correctly, then I suspect
opensync is not converting between the versions properly.

In any case (pun not intended), the WM plugin should be fixed to not rely
on upper/lower case. :-)

- Chris


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Barry-devel mailing list
Barry-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/barry-devel

Reply via email to