Support UTF8 export
This commit is contained in:
parent
d10b916cbf
commit
40a2be8db6
@ -109,10 +109,10 @@ if ($format == 'ical' || $format == 'vcal')
|
||||
$contenttype='text/calendar';
|
||||
if (isset($_GET["contenttype"])) $contenttype=$_GET["contenttype"];
|
||||
//$contenttype='text/plain';
|
||||
|
||||
$outputencoding='UTF-8';
|
||||
if ($outputencoding) header('Content-Encoding: '.$outputencoding);
|
||||
if ($contenttype) header('Content-Type: '.$contenttype);
|
||||
//$contenttype='ISO-8859-1';
|
||||
|
||||
if ($contenttype) header('Content-Type: '.$contenttype.($outputencoding?'; charset='.$outputencoding:''));
|
||||
if ($attachment) header('Content-Disposition: attachment; filename="'.$filename.'"');
|
||||
|
||||
// Ajout directives pour resoudre bug IE
|
||||
@ -140,10 +140,10 @@ if ($format == 'rss')
|
||||
$contenttype='application/rss+xml';
|
||||
if (isset($_GET["contenttype"])) $contenttype=$_GET["contenttype"];
|
||||
//$contenttype='text/plain';
|
||||
|
||||
$outputencoding='UTF-8';
|
||||
if ($outputencoding) header('Content-Encoding: '.$outputencoding);
|
||||
if ($contenttype) header('Content-Type: '.$contenttype);
|
||||
//$contenttype='ISO-8859-1';
|
||||
|
||||
if ($contenttype) header('Content-Type: '.$contenttype.($outputencoding?'; charset='.$outputencoding:''));
|
||||
if ($attachment) header('Content-Disposition: attachment; filename="'.$filename.'"');
|
||||
|
||||
// Ajout directives pour resoudre bug IE
|
||||
|
||||
@ -55,7 +55,8 @@ function build_calfile($format='vcal',$title,$desc,$events_array,$outputfile,$fi
|
||||
fwrite($calfileh,"BEGIN:VCALENDAR\n");
|
||||
fwrite($calfileh,"VERSION:2.0\n");
|
||||
fwrite($calfileh,"METHOD:PUBLISH\n");
|
||||
fwrite($calfileh,"PRODID:-//DOLIBARR ".DOL_VERSION."//EN\n");
|
||||
//fwrite($calfileh,"PRODID:-//DOLIBARR ".DOL_VERSION."//EN\n");
|
||||
fwrite($calfileh,"PRODID:-//DOLIBARR ".DOL_VERSION."\n");
|
||||
fwrite($calfileh,"CALSCALE:GREGORIAN\n");
|
||||
fwrite($calfileh,"X-WR-CALNAME:".$encoding.format_cal($format,$title)."\n");
|
||||
fwrite($calfileh,"X-WR-CALDESC:".$encoding.format_cal($format,$desc)."\n");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user