BOM Trim From First Cell
Remove exactly one initial U+FEFF from the first decoded cell only, preserving interior marks and all subsequent cells.
Description
A decoded byte order mark may appear as U+FEFF at the start of the first cell and accidentally become part of its name or value.
A decoded byte order mark may appear as U+FEFF at the start of the first cell and accidentally become part of its name or value. Removing that one initial mark is different from stripping every matching character in the dataset.1, 2
Remove exactly one initial U+FEFF from the first decoded cell only, preserving interior marks and all subsequent cells.
When to use BOM Trim From First Cell
Use this tool to remove exactly one initial U+FEFF from the first decoded cell only, preserving interior marks and all subsequent cells.
Choose the original CSV text, decoded cell strings, byte values or counts requested by this tool. Use the stated delimiter, encoding, indexing and number/date convention.
How to use BOM Trim From First Cell and understand its results
- Choose the original CSV text, decoded cell strings, byte values or counts requested by this tool. Use the stated delimiter, encoding, indexing and number/date convention.
- Enter values using the field table and calculation rules, then run the tool.
- Read values, removed. The explanation below defines the units, signs, ordering and any flags or placeholder values.
- If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
| Input field | Meaning | Value type; see rules below | Requirement |
|---|---|---|---|
| values | Values | list of string; maximum length: 10000; minimum entries: 0; maximum entries: 10000 | Required |
Supply decoded cell strings in record order. The tool checks only the start of the first cell. If it begins with U+FEFF, exactly one mark is removed; all other characters and cells are preserved. It returns the new list and removed flag. Empty lists return removed false, and two initial marks leave one mark behind.
removed = first cell starts with U+FEFF; only that first code unit is removed Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| values | Values | list of string |
| removed | Removed | boolean |
{
"input": {
"values": [
"id",
"name"
]
},
"output": {
"values": [
"id",
"name"
],
"removed": true
}
} Limitations and assumptions
It does not decode bytes, trim whitespace, remove an interior mark or clean marks at the start of later cells. A mark after initial whitespace remains. Use the byte-oriented remover when the input is still a UTF-8 byte stream.
Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Cell-string lists also have a combined text budget of 100,000 UTF-16 units per list. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors. A successfully returned false flag is an evaluated outcome; its meaning is explained above.
Alternative or Complementary methods
Use BOM Remover First Bytes: Remove an initial UTF-8 EF BB BF signature from byte values and preserve every remaining byte, including interior signatures and other encoding BOMs. For a complementary task, use UTF-16 BOM Encoding Check: Match initial UTF-16 and UTF-32 BOM byte prefixes as encoding hints, preferring the longest signature; FF FE 00 00 remains ambiguous with UTF-16 LE followed by NUL.
Further background: Unicode encoding signatures and byte order marks.
References
-
BOM Trim From First Cell — tool.io
-
Unicode encoding signatures and byte order marks — Unicode Consortium
Similar or alternative tools
- BOM Remover First Bytes
Remove an initial UTF-8 EF BB BF signature from byte values and preserve every remaining byte, including interior signatures and other encoding BOMs.
- UTF-16 BOM Encoding Check
Match initial UTF-16 and UTF-32 BOM byte prefixes as encoding hints, preferring the longest signature; FF FE 00 00 remains ambiguous with UTF-16 LE followed by NUL.