Encoding of special characters in hcard microformat and export to vcard

Discussion in 'HTML & Website Design' started by Marie-Aude, Apr 29, 2008.

  1. #1
    Hello,

    not sure whether it's the proper forum, but I could not find a better one.

    I've coded a hcard on a website, the site is XHTML transitionnal, in utf-8.
    It has some foreign caracters in it ( a è )
    It tried to code it with the è the &# and in the three cases I have the same result when I import it in Outlook : the special caracters don't display correctly.

    I used XV2 (suda.co.uk/projects/X2V/get-vcard2.php) and Technorati (technorati.com/contacts/http://domain.tld) and both protocols produced different strange caracters, but no combination would work properly. Any idea to solve that would be really appreciated.
     
    Marie-Aude, Apr 29, 2008 IP
  2. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I don't know much about the microformats, nor Outlook... however, if you're using XHTML you should not be using stuff like egrave anyway-- even though XHTML is "fake" XHTML, if we bother to write in it, we should at least pretend it really is XML-parsable. That means, no special characters except the 5 allowed in XML (excluding & apos because you're serving this as text/html and that one's not valid HTML, lawlz): & amp, & quot, & gt, & lt...

    But, what is Outlook capable of looking at? It's gotta be a problem on outlook's side, if you're using the &# versions (those are the safest). What kinds of solutions are technorati offering? They should be sticking to the Unicode standards. Is outlook importing while knowing the pages are UTF-8? Is the Byte Order Mark being brought in? (you don't want that, utf-8 actually doesn't need it, utf-16 does... but some text editors leave it in anyway)
     
    Stomme poes, Apr 29, 2008 IP
  3. Marie-Aude

    Marie-Aude Member

    Messages:
    50
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #3
    I finally decided to code in "pure utf-8" but I'm like you, not knowing so much. I spent more than a day browsing official microformat websites and any ressources, and I noticed all exemple are "accented caracters" free.

    I think it's a kind of "Microsoft Outlook" problem, but well... that's a standard, isn't it ?
     
    Marie-Aude, Apr 29, 2008 IP
  4. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #4
    ASCII and Unicode are definitely standards, and Outlook should support them... but I'm wondering if you need to actually set that, manually, somewhere. Being an MS thing, maybe Outlook is defaulting to that MS character set... Windows-1252 or whatever it is...
    http://www.alanwood.net/demos/ansi.html

    And, does your text editor correctly understand the utf-8, and is saving the file as such before you import? There are a few who don't, most famously Notepad.

    I've heard some Apple programmes support hcard natively... are you able to use them to do conversion to vcard instead?
     
    Stomme poes, Apr 29, 2008 IP
  5. Marie-Aude

    Marie-Aude Member

    Messages:
    50
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #5
    If it comes from Outlook, it somehow means that I should set a different type for different applications, which makes no sens.

    And yes, the page is proper UTF-8 (created in Dreamweaver, and checked the encoding).
    I'm working on Windows. And as this hcard is on a website, I can't use a programm to do the conversion (except if I develop it myself... but I won't).
     
    Marie-Aude, Apr 29, 2008 IP
  6. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Hmmm... so, you're trying to import the meta data of this website into Outlook and Outlook is supposed to be able to deal with these tags? Who knows, this character encoding issue might be a common one when dealing with outlook, so maybe there's a microformats forum at the wiki (microformats.org I think) somewheres where other people have aleady paved the road?

    The only person here I know of who actually has any familiarity with RDFa and microformats is Jamesicus. And I don't know if he actually ever used hCard.
     
    Stomme poes, Apr 29, 2008 IP
  7. Marie-Aude

    Marie-Aude Member

    Messages:
    50
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #7
    Well, it's not "meta", it's really XHTML.
    
    <div class="vcard" id="Maroc">
    <p><a href="http://www.lumieredelune.com" title="Photo and Web" class="url fn n"><span class="given-name">Marie-Aude</span> <span class="family-name">Koiransky</span></a></p>
    <p class="org">Lumière de Lune</p>
    <p><a href="<?php "http://suda.co.uk/projects/X2V/get-vcard2.php?uri=".$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']?>#Maroc" title="Add to address book">Add to address book</a></p>
    </div>
    Code (markup):
    ... short excert
    The Suda links uses an interface developped by one of the creator of the hcard to transform it into vcard. vcard is a standard used not only by Outlook, but by your mobile phone, and hcard is based on vcard...

    There is a wiki ... unfortunatly, all examples are "english" based, which means without the problematic caracters.
     
    Marie-Aude, Apr 29, 2008 IP
  8. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Hmmm, just looking around on teh googlies, it seems they like to use the HTML encodings
    Anyway, I'm stumped and so far have avoided the microformats because they use abbr which also has a different HTML meaning... so i'm kinda rooting for RDFa to take off instead, mabe incorporate some hcard stuff since it's already working... since i don't write blogs or journals, it's pretty useless to me, but if a real-estate or insurance format comes up, we may jump on the bandwagon then.
     
    Stomme poes, Apr 29, 2008 IP
  9. Marie-Aude

    Marie-Aude Member

    Messages:
    50
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #9
    As I do a lot of hotel sites, the GEO and hCard interest me, specially it seems to be easily integrated with Google maps. That's the main reason for me to use them.
     
    Marie-Aude, Apr 29, 2008 IP
  10. Marie-Aude

    Marie-Aude Member

    Messages:
    50
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #10
    Well final answer after discussing that with the people of microformat.org... it's a specific Outlook problem
     
    Marie-Aude, May 5, 2008 IP
  11. jamesicus

    jamesicus Peon

    Messages:
    477
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #11
    There is a lot of Semantic Web activity these days:

    BetaNews - Digg makes official its adoption of a 'Semantic Web' standard

    Digg THE BLOG - Digg Rolls Out DataPortability Enhancements - XHTML+RDFa and information relating to XFN & hCard

    The Semantic Web - Activity & Weblog Updates plus references & resources.

    XHTML+RDFa Syntax and Constructs - utilization for XHTML+RDFa web pages - Doctype - Friend-of-a-Friend (FOAF).



    James
     
    jamesicus, May 5, 2008 IP