The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
RFC 5545 recommends that iCalendar content lines be no longer than 75 octets, excluding the line break—not 75 displayed characters. Since iCalendar uses UTF-8 by default, a line with fewer than 75 characters can still exceed 75 octets. Generators should fold longer lines, and parsers must unfold them before parsing.
What RFC 5545 means by 75 octets
In RFC 5545, Section 3.1, the IETF says: “Lines of text SHOULD NOT be longer than 75 octets, excluding the line break.” An octet is an eight-bit byte. The count applies to the encoded content-line data; the CRLF that separates lines is not included.
| # | Preview | Product | Price | |
|---|---|---|---|---|
| 1 |
|
IDEAS OF REFERENCE | Buy on Amazon |
The wording matters: “SHOULD NOT” is a standards recommendation, not an absolute MUST-level prohibition. The same section says generators should fold lines that exceed 75 octets. It also requires parsers to unfold folded lines before parsing.
Why 75 characters can exceed 75 octets
RFC 5545 specifies UTF-8 as the default character set for an iCalendar stream. In UTF-8, some characters take multiple octets, so counting visible characters does not reliably measure line length. A line containing 75 characters can occupy more than 75 octets if some characters have multibyte encodings. Count the UTF-8 encoded data, not the characters shown on screen.
#1 Best Overall
For MIME transports, the RFC says the Content-Type charset parameter must specify the charset being used. The default UTF-8 rule applies to the iCalendar stream; the MIME parameter communicates the charset for that transport.
How to fold an overlong content line
When generating a content line longer than 75 octets, insert a fold: CRLF followed immediately by one linear whitespace character, either a SPACE or a HTAB. That whitespace is a structural continuation marker, not content to retain as an ordinary character after unfolding.
There is an important UTF-8 edge case. RFC 5545 notes that a simple folding implementation might split a multioctet UTF-8 sequence. A parser must remove the fold marker and reconstruct the original sequence correctly; it cannot assume every fold boundary falls between complete characters.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →How parsers should handle folded lines
Before interpreting the content of a folded line, a parser removes the CRLF and the immediately following SPACE or HTAB. This unfolding step restores the logical content line. The parser then processes that reconstructed line, taking care to preserve valid UTF-8 even if the fold divided a multioctet sequence.
In practical terms, a conforming implementation needs to distinguish the encoded byte stream from the displayed text: generators measure the encoded line data, and parsers remove folding markers before parsing the content.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Implementation checklist
- Measure the UTF-8 encoded content in octets, not the number of displayed characters.
- Exclude the CRLF line break from the 75-octet count.
- When folding a longer line, insert CRLF followed immediately by exactly one SPACE or HTAB.
- When parsing, remove that CRLF and continuation whitespace before interpreting the line.
- Ensure unfolding correctly restores UTF-8 if the fold occurs inside a multioctet sequence.
The RFC establishes these format rules but does not prescribe a particular programming language, byte-counting API, or library. Implementations should follow the byte-level behavior regardless of their chosen tools.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Recommended Free Tools

