Outlook iCal会议邀请描述问题 [英] Outlook iCal meeting invitation description issue

查看:236
本文介绍了Outlook iCal会议邀请描述问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发送 iCal 事件邀请使用 php 。所有内容都以正确的方式显示, RVSP 按钮正确显示。 描述第一行之后。例如,如果我的描述是:

I am sending iCal event invitation using php. Everything displays in proper manner and RVSP button displayed correctly. But description is cutting down after first line. For example if my description is:

The problem occurs when I have multiple lines in the description. 
If it contains the text for example I will only get in my outlook calendar 
description. The part after disappears.

唯一的第一行显示如下:

The only first line displays like:

The problem occurs when I have multiple lines in the description.

如果有人帮助我
我已经包装线,但是在第一行之后它不会显示。这里是代码片段。

If someone help me. I have already wrap the lines but after first line it will not displayed. Here is code snippet.

function ical_split($preamble, $value) {
    $value = trim($value);
    $value = strip_tags($value);
    $value = preg_replace('/\n+/', ' ', $value);
    $value = preg_replace('/\s{2,}/', ' ', $value);
    $preamble_len = strlen($preamble);
    $lines = array();
    while (strlen($value)>(74-$preamble_len)) {
        $space = (74-$preamble_len);
        $mbcc = $space;
        while ($mbcc) {
            $line = mb_substr($value, 0, $mbcc);
            $oct = strlen($line);
            if ($oct > $space) {
                $mbcc -= $oct-$space;
            }
            else {
                $lines[] = $line;
                $preamble_len = 1; // Still take the tab into account
                $value = mb_substr($value, $mbcc);
                break;
            }
        }
    }
    if (!empty($value)) {
        $lines[] = $value;
    }
    return join($lines, "\\n\\t");
}

我打电话给如下:

$meeting_notes="The problem occurs when I have multiple lines in the description. If it contains the text for example I will only get in my outlook calendar description. The part after disappears."
ical_split('DESCRIPTION:', $meeting_notes)

这里附加ics文件的详细信息。

Here the detail of attached ics file.

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VEVENT
DTSTART:20150227T163000Z
DTEND:20150227T173000Z
DTSTAMP:20150211T094306Z
ORGANIZER;CN=Charlene Switzer:MAILTO:email_here
UID:40
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=name_here;X-NUM-GUESTS=0:MAILTO:email_here
DESCRIPTION:The problem occurs when I have multiple lines in the description. If it contains the text for example I will only get in my outlook calendar description. The part after disappears.
LOCATION:asdf asd
SEQUENCE:0
STATUS:CONFIRMED
TRANSP:OPAQUE
SUMMARY:Meeting
PRIORITY:5
CLASS:PUBLIC
BEGIN:VTIMEZONE
TZID:Eastern
END:VTIMEZONE
END:VEVENT
END:VCALENDAR


推荐答案

为了消除Dmitry的解释,您需要参考指定iCalendar格式的RFC5545

To expend on Dmitry's explanation, you need to refer to RFC5545 which specifies the iCalendar format

3.1。内容行

3.1. Content Lines


iCalendar对象被分为单独的文本行,
称为内容行。内容行由换行符分隔,
是CRLF序列(CR字符后跟LF字符)。

The iCalendar object is organized into individual lines of text, called content lines. Content lines are delimited by a line break, which is a CRLF sequence (CR character followed by LF character).

文本行不应超过75个八位字节,不包括行
中断。长内容线应使用线折叠技术分割成多行
表示。也就是说,通过插入一个CRLF
,紧跟着一个单一的线性空格字符(即
SPACE或HTAB),可以在任意两个字符之间分割长
行。

Lines of text SHOULD NOT be longer than 75 octets, excluding the line break. Long content lines SHOULD be split into a multiple line representations using a line "folding" technique. That is, a long line can be split between any two characters by inserting a CRLF immediately followed by a single linear white-space character (i.e., SPACE or HTAB).

所以回到你的问题,像Dmitry的建议你应该添加一个 TAB 或一个 SPACE 您的CRLF后,您还应确保您的行数不超过75字节。

So back to your question, like Dmitry's suggest you should add a TAB or a SPACE after your CRLF but also you should make sure your lines aren't longer than 75bytes.

这篇关于Outlook iCal会议邀请描述问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆