...

View Full Version : PHP question or not?



ravin
05-14-2008, 06:17 PM
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?



<?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

ravin
05-14-2008, 07:03 PM
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 :D

GJay
05-14-2008, 08:51 PM
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'.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum