Unicode 0x1E: The Record Separator Character Explained
What the U+001E record separator does, why it is invisible, and how to find, show, split on or remove it safely with step-by-step checks.
The character at Unicode code point 0x1E (written U+001E) is the Record Separator, usually abbreviated RS. It is a control character with no visible shape, so it can sit inside a file and quietly break parsing, comparisons or imports while the text looks normal on screen. This guide explains what it is, what it does to text, and how to detect it step by step and confirm the result.
What U+001E is
U+001E comes from ASCII, where it was defined as one of four information separators. Unicode kept it unchanged in the C0 control range (U+0000 to U+001F). Because it falls below U+0080, it encodes in UTF-8 as a single byte, 0x1E, exactly as in ASCII.
| Property | Value |
| Code point | U+001E |
| Hexadecimal | 0x1E |
| Decimal | 30 |
| Octal | 036 |
| Abbreviation | RS |
| Unicode name aliases | RECORD SEPARATOR; INFORMATION SEPARATOR TWO |
| General category | Cc (control) |
| UTF-8 bytes | 1E |
| Caret notation | ^^ (often typed as Ctrl+^) |
| Visible stand-in symbol | U+241E ␞ SYMBOL FOR RECORD SEPARATOR |
What the record separator does to your text
RS marks the boundary between records, meaning one complete entry in a stream of data, much like a row in a table. It does not display anything or move the cursor. Its only effect is structural: a program that knows the convention treats each RS as the end of one record and the start of the next. Programs that do not know the convention treat it as an ordinary, invisible character that becomes part of whatever string surrounds it.
The input it applies to is any plain text or byte stream. The scope that matters is the whole data stream: RS affects how the stream is divided, not how individual characters look. Removing or converting it therefore changes record boundaries, which is a meaningful change even though nothing visible disappears.
The four information separators
RS is part of a nested hierarchy. Each separator marks a larger unit than the one below it, so data can be split into files, groups, records and fields without relying on commas, tabs or newlines that might also appear inside the content.
| Code point | Abbreviation | Name | Unit it separates |
| U+001C | FS | File Separator | Largest unit (file) |
| U+001D | GS | Group Separator | Group of records |
| U+001E | RS | Record Separator | Record |
| U+001F | US | Unit Separator | Field within a record |
Where you are likely to meet it
- JSON text sequences: the format standardized in RFC 7464 (media type application/json-seq) places an RS before each JSON text in a stream, so a reader can recover even if one entry is damaged.
- Structured barcode data: the ISO/IEC 15434 message format uses RS and GS as delimiters, so scanned barcode strings can contain them.
- Legacy and custom data exports: some systems use the separator family instead of CSV so that commas and line breaks inside values need no escaping.
- Accidental contamination: text copied between systems or produced by faulty conversions can carry stray control characters, including RS.
Why you cannot see it
Control characters have no glyph. Depending on the editor, terminal or font, RS may be shown as nothing at all, a small box, an inverted RS label, the caret form ^^, or the picture symbol ␞. Display behavior varies between applications and versions, so an apparently clean line on screen is not proof that the character is absent. Inspecting the actual bytes or code points is the reliable approach.
How to detect U+001E step by step
Step 1: count occurrences. On Linux or macOS, the following command deletes every byte except 0x1E and counts what remains. A result of 0 means the file contains no RS characters. The file name is an example.
tr -cd '\036' < data.txt | wc -c
Step 2: find the lines that contain it. In bash, the $'\x1e' form passes the real character to grep. The -n option prints line numbers. This only reports lines, so it is most useful when the file also contains newlines.
grep -n $'\x1e' data.txt
Step 3: look at the bytes. A hex dump shows RS as 1e, od -c shows it as 036, and cat -v shows it in caret notation as ^^. For example, a string made of alpha, then RS, then beta should appear as alpha^^beta under cat -v. This is an illustrative example based on the documented notation, not a captured output.
xxd data.txt | head
od -c data.txt | head
cat -v data.txt | head
Step 4: make it visible in your own code. In Python, you can locate every RS and replace it with the visible symbol ␞ for review. This changes only a display copy, not the original data.
with open("data.txt", encoding="utf-8") as f:
text = f.read()
positions = [i for i, ch in enumerate(text) if ch == "\x1e"]
print(len(positions), positions[:10])
preview = text.replace("\x1e", "\u241e")
print(preview[:500])
In JavaScript, the same character is written "\u001E". A regular expression such as /\u001E/g matches it, and text.includes("\u001E") tests for its presence.
Splitting text into records
If RS is used intentionally as a delimiter, split on that exact character rather than on general whitespace or line breaks. These examples show the pattern in Python, awk and the shell.
# Python
records = text.split("\x1e")
# awk: treat RS as the record terminator
awk 'BEGIN { RS = "\036" } { print NR ": " $0 }' data.txt
# shell: put each record on its own line for viewing
tr '\036' '\n' < data.txt
Converting RS to newlines with tr is convenient for viewing, but it is lossy if records themselves contain newlines: you will no longer be able to tell a record boundary from a line break inside a value. Write the result to a separate file rather than overwriting the original.
Pitfalls that change content unintentionally
- Python treats RS as whitespace and as a line boundary: '\x1e'.isspace() is True, so str.split() with no argument and str.strip() will split on or remove it, and str.splitlines() breaks lines at it. Use text.split("\x1e") when you mean RS specifically, and be aware that a plain strip() can silently remove a leading or trailing separator.
- JSON strings cannot contain raw control characters, so inside a JSON string value RS must appear escaped, typically as \u001e. In the JSON text sequence format, by contrast, the raw RS byte sits outside the JSON texts as a framing marker.
- XML 1.0 does not allow U+001E at all, even as a character reference. Text containing it will be rejected by a conforming XML 1.0 parser unless the character is removed or encoded another way.
- Editors and form fields may strip or replace control characters when saving or pasting, which can remove record boundaries without warning.
- Removing every RS with a command such as tr -d '\036' merges adjacent records. Only do this when you have confirmed the characters are stray, not structural.
How to verify the result
- Record the RS count from Step 1 before making any change.
- If you split into records, check that the number of records matches what you expect. With split, a stream of N separators yields N + 1 pieces, and an RS at the very start or end produces an empty piece.
- If you removed or replaced RS, run the count again on the output file and confirm it is 0, or the expected remaining number.
- Compare file sizes: deleting RS should reduce the size by exactly the number of characters removed, since each one is a single byte in UTF-8.
- Spot-check a few records with cat -v or the Python preview to confirm that visible content is unchanged apart from the separators.
Limits of this guide
The code points, encodings and notations above follow the ASCII and Unicode definitions. The commands and code are examples written for typical GNU or POSIX tools and current Python and JavaScript; they have not been run against your files here, and option support can differ between tool versions and operating systems. How a particular editor, database or import tool handles U+001E is application-specific and should be checked in that product's own documentation.