Re: Multisync: patch and question

Armin Bauer <[email protected]>
Newsgroups gmane.comp.gnome.apps.multisync.user
Message-ID <[email protected]>
Gonzalo Diethelm wrote:

>On Tue, 2005-03-29 at 08:41 +0200, Armin Bauer wrote:
>  
>
>>>I did that and at least found out what the data server is disliking: the
>>>error it prints out is the following (with slight editing of mine):
>>>
>>>  ~/.evolution/calendar/local/system/calendar.ics-msyncid2.db:29:
>>>  parser error : Input is not proper UTF-8, indicate encoding !
>>>  Bytes: 0xE9 0x20 0x45 0x6A
>>>  SUMMARY:Comit\uffff Ejecutivo cajas
>>>      
>>>
>>               ^
>>
>>Where does this \u come from? is it in one of the vcards when you do the
>>first sync?
>>    
>>
>
>Sorry, I think that is an artifact of the cut and paste. That's why I
>included the output of octal dump:
>
>  
>
>>>An "od -cx" dump of a file containing just that one line is:
>>>
>>>0000000   S   U   M   M   A   R   Y   :   C   o   m   i   t 351       E
>>>        5553 4d4d 5241 3a59 6f43 696d e974 4520
>>>0000020   j   e   c   u   t   i   v   o       c   a   j   a   s  \n  \0
>>>        656a 7563 6974 6f76 6320 6a61 7361 000a
>>>      
>>>
>
>This dump shows the offending character to be 0xe9. It is supposed to be
>(and it does show like that on the first sync) an Spanish accented
>character, the letter "e" with an accent mark \' on top of that (if this
>mail arrives Ok on your side, it should look like "é"; the equivalent of
>HTML's "&eacute;").
>
>I tried replacing that character with a simple "e", and the line gave no
>problem, but it gave me an error on the next accented character, so this
>definitely seems to be an encoding issue.
>
>Something else: the beginning of my calendar.ics-msyncid2.db has the
>following line:
>
>  <?xml version="1.0" encoding="UTF-8"?>
>
>So it does declare the file to be encoded with UTF-8.
>
>  
>
ah. now it makes sense :)

so evolution2 gets a vcard that is iso-8859-1 encoded. from the manpage:

E9           LATIN SMALL LETTER E WITH ACUTE

so i think the correct approach to this would be to fix in the other 
plugin since all vcards passing through multisync should be encoded in utf8.

Another possibility would be to use g_utf8_validate in the evo2 plugin 
and if it returns false use g_convert from iso-8859-1 to utf8. But this 
would just be a ugly hack.

>Thanks,
>
>
>  
>



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.