Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Dec 2006
    Posts
    23
    Thanks
    1
    Thanked 0 Times in 0 Posts

    PHP question or not?

    Hello, im unable to import this vcs charset into Microsoft Outlook.

    The swedish letters is not working, it defaults to ascii or utf-8, any idea why?

    Code:
    <?php
        header("Content-Type: text/x-vCalendar; charset=ISO-8859-1");
        header("Content-Disposition: inline; filename=Meeting.vcs");
    
    ?>
    BEGIN:VCALENDAR
    VERSION:1.0
    BEGIN:VEVENT
    UID:mg3144-51
    DTSTART:20080516T133000Z
    DTEND:20080516T143000Z
    LOCATION;ENCODING=QUOTED-PRINTABLE:Council Chamber, Civic Offices, Swindon
    CATEGORIES;CHARSET=ISO 8859-1;ENCODING=QUOTED-PRINTABLE:Ärende
    SUMMARY;CHARSET=ISO 8859-1;ENCODING=QUOTED-PRINTABLE:Anslut: Nätverksproblem
    DESCRIPTION;ENCODING=QUOTED-PRINTABLE:14:30 Council Chamber, Civic Offices, Swindon =0D=0A=0D=0ATo view this 
    
    meeting in modern.gov use the following link: 
    
    http://ww2.swindon.gov.uk/moderngov/ieListDocuments.asp?CommitteeId=3D284&CF=3D&MeetingId=3D3144&Ver=3D4
    PRIORITY:3
    END:VEVENT
    End:VCALENDAR

  • #2
    New Coder
    Join Date
    Dec 2006
    Posts
    23
    Thanks
    1
    Thanked 0 Times in 0 Posts
    aahh found the problem, I cant use swedish characters, i need to use

    =C5 =C4 =D6 =E5 =E4 =F6

    That sucks, then i would need to write a string replace for all swedish charactors in a $message before sending it.

    $customer=&#196;nda

    $letters = array("&#197;", "&#196;", "&#214;", "&#229;", "&#228;", "&#246;");
    $transform = array("=C5", "=C4", "=D6", "=E5", "=E4", "=F6");

    $customer2 = str_replace($letters, $transform, $customer);

    Solved
    Last edited by ravin; 05-14-2008 at 08:24 PM.

  • #3
    Senior Coder
    Join Date
    Sep 2005
    Posts
    1,791
    Thanks
    5
    Thanked 36 Times in 35 Posts
    The php.net manual page for the quoted_printable_decode() function has a few examples of quoted_printable_encode() functions that might be a bit more future-proof - it isn't just swedish characters that will need encoding. Or the Zend Framework has Zend_Mime::encodeQuotedPrintable() that you might want to 'borrow'.
    My thoughts on some things: http://codemeetsmusic.com
    And my scrapbook of cool things: http://gjones.tumblr.com


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •