Skip to content

TSV values can contain newlines and tabs which should be escaped #3

@svetlyak40wt

Description

@svetlyak40wt

Without escaping, the library can produce broken serialized lines or broken values during parsing.

Right now it is not supported:

POFTHEDAY> (concatenate 'string
                        "Hello"
                        '(#\Newline #\Tab)
                        "World!")
"Hello
	World!"

;; This call should produce a single line,
;; replacing a newline with \n and tab with \t:
POFTHEDAY> (cl-ltsv:alist-ltsv (list (cons "message" *)))
"message:Hello
	World!"

;; Parsing does not process escaped symbols either:

POFTHEDAY> (cl-ltsv:parse-line "message:Hello\\n\\tWorld!")
(("message" . "Hello\\n\\tWorld!"))

More info on escaping rules is available in this TSV article.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions