Hi,
   
I have mobile phone Simens S65.
I have decided to use multisync for synchronization between my phone and
for example KDE  organizer.  But there is one problem. The thing  is
that my phone's directory records are made in the non-Latin1 encoding. I
used Russian Letters. Problems have arisen in field FN: in KDE
addressbook my records have been spoiled. I have been  trying to solve
the  problem and have found out, that while transmission the Vcard phone
is not give back field FN:. It turns out  that  when this field is
absent the multisync itself forms  it. But it forms the field
improperly. Here an example (I used Latin1 instead of utf-8 in my data
for convenience)

BEGIN:VCARD
VERSION:2.1
X-IRMC-LUID:2691826394
X-ESI-CATEGORIES;CHARSET=UTF-8:Gas
N;CHARSET=UTF-8:Vasiliev;Vlad
FN:Vlad Vasiliev
TEL;CELL:123455664
EMAIL;INTERNET:[EMAIL PROTECTED]
END:VCARD

Field FN: has no instruction CHARSET. Here a small patch solving this problem:

--- multisync-0.82+cvs.orginal/src/sync_vtype.c 2005-08-07 21:49:01.000000000 
+0300 
+++ multisync-0.82+cvs/src/sync_vtype.c 2005-08-07 21:50:07.314830552 +0300 
@@ -566,7 +566,15 @@
        char last[256]="", first[256]="";
        if (sscanf(value, "%255[^;];%255[^;]", last, first) > 0 ||
            sscanf(value, ";%255[^;]", first) > 0) {
-         g_string_append(outcard, "FN:"); 
+          if (strlen(linecharset)>0) 
+          { 
+            g_string_append(outcard, "FN;CHARSET="); 
+           g_string_append(outcard,linecharset); 
+           g_string_append(outcard,":"); 
+           } 
+          else{ 
+             g_string_append(outcard, "FN:"); 
+          } 
          if (strlen(first) > 0)
            g_string_append(outcard, first);
          if (strlen(first) > 0 && strlen(last) > 0)


Vlad Vasiliev




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Multisync-devel mailing list
Multisync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/multisync-devel

Reply via email to