Handling Long Lines in Content of Internet-Drafts and RFCs
RFC 8792

Document Type RFC - Informational (June 2020; No errata)
Authors Kent Watsen  , Erik Auerswald  , Adrian Farrel  , Qin Wu 
Last updated 2020-06-29
Replaces draft-kwatsen-netmod-artwork-folding
Stream IETF
Formats plain text html xml pdf htmlized bibtex
Reviews
Stream WG state Submitted to IESG for Publication
Document shepherd Lou Berger
Shepherd write-up Show (last changed 2019-07-24)
IESG IESG state RFC 8792 (Informational)
Consensus Boilerplate Yes
Telechat date
Responsible AD Alissa Cooper
Send notices to Lou Berger <lberger@labn.net>


Internet Engineering Task Force (IETF)                         K. Watsen
Request for Comments: 8792                               Watsen Networks
Category: Informational                                     E. Auerswald
ISSN: 2070-1721                                   Individual Contributor
                                                               A. Farrel
                                                      Old Dog Consulting
                                                                   Q. Wu
                                                     Huawei Technologies
                                                               June 2020

       Handling Long Lines in Content of Internet-Drafts and RFCs

Abstract

   This document defines two strategies for handling long lines in
   width-bounded text content.  One strategy, called the "single
   backslash" strategy, is based on the historical use of a single
   backslash ('\') character to indicate where line-folding has
   occurred, with the continuation occurring with the first character
   that is not a space character (' ') on the next line.  The second
   strategy, called the "double backslash" strategy, extends the first
   strategy by adding a second backslash character to identify where the
   continuation begins and is thereby able to handle cases not supported
   by the first strategy.  Both strategies use a self-describing header
   enabling automated reconstitution of the original content.

Status of This Memo

   This document is not an Internet Standards Track specification; it is
   published for informational purposes.

   This document is a product of the Internet Engineering Task Force
   (IETF).  It represents the consensus of the IETF community.  It has
   received public review and has been approved for publication by the
   Internet Engineering Steering Group (IESG).  Not all documents
   approved by the IESG are candidates for any level of Internet
   Standard; see Section 2 of RFC 7841.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   https://www.rfc-editor.org/info/rfc8792.

Copyright Notice

   Copyright (c) 2020 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (https://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction
   2.  Applicability Statement
   3.  Requirements Language
   4.  Goals
     4.1.  Automated Folding of Long Lines in Text Content
     4.2.  Automated Reconstitution of the Original Text Content
   5.  Limitations
     5.1.  Not Recommended for Graphical Artwork
     5.2.  Doesn't Work as Well as Format-Specific Options
   6.  Two Folding Strategies
     6.1.  Comparison
     6.2.  Recommendation
   7.  The Single Backslash Strategy ('\')
     7.1.  Folded Structure
       7.1.1.  Header
       7.1.2.  Body
     7.2.  Algorithm
       7.2.1.  Folding
       7.2.2.  Unfolding
   8.  The Double Backslash Strategy ('\\')
     8.1.  Folded Structure
       8.1.1.  Header
       8.1.2.  Body
     8.2.  Algorithm
       8.2.1.  Folding
       8.2.2.  Unfolding
   9.  Examples
     9.1.  Example Showing Boundary Conditions
       9.1.1.  Using '\'
       9.1.2.  Using '\\'
     9.2.  Example Showing Multiple Wraps of a Single Line
       9.2.1.  Using '\'
       9.2.2.  Using '\\'
     9.3.  Example Showing "Smart" Folding
       9.3.1.  Using '\'
       9.3.2.  Using '\\'
     9.4.  Example Showing "Forced" Folding
       9.4.1.  Using '\'
       9.4.2.  Using '\\'
   10. Security Considerations
   11. IANA Considerations
   12. References
     12.1.  Normative References
     12.2.  Informative References
   Appendix A.  Bash Shell Script: rfcfold
   Acknowledgements
   Authors' Addresses

1.  Introduction

   [RFC7994] sets out the requirements for plain-text RFCs and states
   that each line of an RFC (and hence of an Internet-Draft) must be
   limited to 72 characters followed by the character sequence that
   denotes an end-of-line (EOL).

   Internet-Drafts and RFCs often include example text or code
   fragments.  Many times, the example text or code exceeds the
   72-character line-length limit.  The 'xml2rfc' utility [xml2rfc], at
   the time of this document's publication, does not attempt to wrap the
   content of such inclusions, simply issuing a warning whenever lines
   exceed 69 characters.  Historically, there has been no convention
   recommended by the RFC Editor in place for how to handle long lines
Show full document text