iCalendar (rfc2445) 中的 TEXT 值中的冒号字符是否应该转义?

发布于 2024-08-08 17:03:28 字数 1579 浏览 2 评论 0原文

我通过阅读规范的理解(http://www.ietf.org/rfc/rfc2445.txt )的一个问题是“:”字符不应该在像描述这样的文本值中被转义。

来自 RFC:

“TEXT”属性值也可能 包含特殊字符 用于表示分隔符,例如 值列表的逗号字符 或分号字符 结构化的价值观。为了
支持将这些特殊的 “TEXT”属性中的字符
值,它们必须用转义 反斜杠字符。反斜杠
字符(US-ASCII 十进制 92) “TEXT”属性值必须是
用另一个反斜杠逃脱 特点。
中的逗号字符 “TEXT”属性值必须被转义 带有反斜杠字符
(US-ASCII 十进制 92)。分号 “TEXT”属性中的字符
值必须用反斜杠转义 字符(US-ASCII 十进制 92)。 但是,“TEXT”中的冒号字符 属性值不应被转义 带有反斜杠字符。

我之所以问这个问题,是因为我在 Mac OS X 版 Meeting Maker v8.7.1b63 中收到了由于该字符导致的语法错误,但 Windows 版本的软件(相同版本号)却没有收到语法错误。我用我编写的软件生成的 ics 文件令人窒息。这是他们的我的软件中的错误吗?

这是收到错误的 iCalendar 文件:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//abc/abc//NONSGML v1.0//EN
BEGIN:VEVENT
UID:[email protected]
DTSTART:20091022T133000
DTEND:20091022T150000
SUMMARY:Special Topics in Power Point
LOCATION:The Location 
DESCRIPTION:Learn how to use PowerPoint as a tool to organize and pres
 ent your ideas to others.  Basic computer skills are required.  This h
 ands-on workshop will provide you with experience in the following: wh
 at's new in PowerPoint 2007\, presentation basics\, working with text
 \, viewing a presentation\, formatting\, finalizing a presentation and
  delivering a presentation.
END:VEVENT
END:VCALENDAR

请注意描述第三行的冒号。在这个冒号中添加斜杠可以修复 Mac 上的问题,但我认为根据标准这是不正确的。

感谢您的帮助!

My understanding from reading the specification (http://www.ietf.org/rfc/rfc2445.txt) is that the ":" character should not be escaped in text values like DESCRIPTION.

From the RFC:

The "TEXT" property values may also
contain special characters that are
used to signify delimiters, such as a
COMMA character for lists of values
or a SEMICOLON character for
structured values. In order to
support the inclusion of these special
characters in "TEXT" property
values, they MUST be escaped with a
BACKSLASH character. A BACKSLASH
character (US-ASCII decimal 92) in a
"TEXT" property value MUST be
escaped with another BACKSLASH
character. A COMMA character in a
"TEXT" property value MUST be escaped
with a BACKSLASH character
(US-ASCII decimal 92). A SEMICOLON
character in a "TEXT" property
value MUST be escaped with a BACKSLASH
character (US-ASCII decimal 92).
However, a COLON character in a "TEXT"
property value SHALL NOT be escaped
with a BACKSLASH character.

I ask this because I'm receiving syntax errors in Meeting Maker v8.7.1b63 for Mac OS X due to this character but not for the Windows version of the software (same version number). It's choking on ics files I'm generating from software I've written. Is this a bug in my software of theirs?

This is the iCalendar file that is receiving the error:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//abc/abc//NONSGML v1.0//EN
BEGIN:VEVENT
UID:[email protected]
DTSTART:20091022T133000
DTEND:20091022T150000
SUMMARY:Special Topics in Power Point
LOCATION:The Location 
DESCRIPTION:Learn how to use PowerPoint as a tool to organize and pres
 ent your ideas to others.  Basic computer skills are required.  This h
 ands-on workshop will provide you with experience in the following: wh
 at's new in PowerPoint 2007\, presentation basics\, working with text
 \, viewing a presentation\, formatting\, finalizing a presentation and
  delivering a presentation.
END:VEVENT
END:VCALENDAR

Note the colon on the third line of the description. Adding a slash to this colon fixes the problem on the Mac but I think this is incorrect according to the standard.

Thanks for your help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一袭白衣梦中忆 2024-08-15 17:03:29

这似乎是他们软件中的一个错误。

“但是,a 中的冒号字符
“TEXT”属性值不得为
使用反斜杠字符转义。”

非常简单。

看看他们是否有任何补丁。
如果没有,请尝试联系他们并告诉他们。

It appears to be a bug in their software.

"However, a COLON character in a
"TEXT" property value SHALL NOT be
escaped with a BACKSLASH character."

Is pretty straightforward.

See if they have any patches.
If not, try to contact them and tell them about it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文