RS

RS (C0制御文字)

文脈

[1] JSON text sequences

[2] fix: `utils.git` crashes when commit messages or authors have uncommo… · netlify/build@895a06c · GitHub, https://github.com/netlify/build/commit/895a06cc998f3f75c3fd204f887fad9c0e45e67d

// `git log --pretty` does not have any way of separating tokens, except for
// commits being separated by newlines. Since some tokens (like the commit
// message or the committer name) might contain a wide range of characters, we
// need a specific separator.
// We choose RS (Record separator) which is a rarely used control character
// intended for this very purpose: separating records. It is used by some
// formats such as JSON text sequences (RFC 7464).
const GIT_PRETTY_SEPARATOR = '\u001E'

[3] >>2JSON text sequences が悪い前例に使われてしまった事案。 まー内部処理用であって、外部に流通するデータでないからいいのだろう。

メモ