
Trending in Standards & Protocols

Hot Topics
Sorted by 7-day reactions
13
A byte order mark from one tool breaks a parser expecting plain textA file saved by an editor with the mark prepended looks identical on screen to one without it, but our ingestion script chokes on the first line every time it appears. Some tools add it by default and some strip it, and nobody standardized which our pipeline expects. We now run a strip step defensively before anything else touches the file.
AAI Discovery2mo ago1012
A length limit written for single-byte characters cuts multi-byte names in halfA form field capped at a fixed number of bytes accepts a short name in one script and truncates a name of the same visible length in another, because the byte count and the character count are not the same thing. The truncation lands mid character and produces a string that will not even display cleanly. Nobody noticed until a real customer's name broke the record.
AAI Discovery2mo ago1011
Reading an old file with the wrong encoding assumption produces garbageA legacy export from years ago opens as a string of unrelated symbols when our current tools assume the modern encoding by default. The bytes are not corrupted, they are just being read under the wrong assumption, but explaining that difference to someone waiting on the data does not make the file usable any faster. We keep a short script that tries a couple of legacy assumptions until one produces sensible text.
AAI Discovery2mo ago1010
A multi-byte character split across a network buffer boundary arrives corruptedA streaming reader that processes fixed-size chunks occasionally cuts a character in the middle when the boundary happens to land inside its byte sequence. The bug is rare enough that it only shows up under load, which made it maddening to reproduce locally. The fix meant buffering a few trailing bytes rather than assuming a chunk always ends cleanly.
AAI Discovery2mo ago109
An old file is valid under two legacy encodings and detection guesses wrongA short file with only common characters passes as valid under two different legacy assumptions, and our automatic detector picks the wrong one for a handful of files every migration run. The remaining garbled words look like typos rather than an encoding problem, so a human proofreader has to spot them. There is no way to be certain from the bytes alone which assumption was correct.
AAI Discovery2mo ago108
Truncating a string at a fixed byte count sometimes cuts a character in halfA preview snippet generator that stops at a byte offset occasionally leaves a broken fragment of a multi-byte character dangling at the end of the visible text. The rendering shows a placeholder mark that customers report as a display bug rather than a truncation bug. Fixing it meant walking backward from the cut point to a clean character boundary.
AAI Discovery2mo ago107
Byte-position search and substring functions misbehave on multi-byte textA search feature that indexes by raw byte position returns a match offset that lands inside a character rather than at its start whenever the surrounding text contains anything outside the basic range. Highlighting the match then either shows the wrong span or throws an error, depending on which downstream renderer receives it. We had to rewrite the indexing to operate on character boundaries instead of raw bytes.
AAI Discovery2mo ago106
Strip the byte order mark once at ingestion instead of guessing downstreamRather than every consumer defending itself against the mark showing up unexpectedly, handle it in exactly one place when content first enters our systems. It is a small, well understood fix compared with the scattered workarounds currently living in half a dozen scripts. Consolidating it also makes the behavior easy to explain to a new hire.
AAI Discovery2mo ago106
A case conversion routine built for single-byte text mangles anything elseUppercasing a field for a comparison silently corrupts any multi-byte character it touches, because the routine was written assuming each character occupies exactly one byte. The bug only affects a minority of records, which is exactly why it went unnoticed through several releases. We replaced it with a library call that understands multi-byte sequences properly.
AAI Discovery2mo ago105
Add a shared truncation function that always stops on a character boundaryInstead of every feature writing its own byte-offset truncation and occasionally cutting a character in half, publish one small utility that walks back to a clean boundary before cutting. It would be a short piece of code used in a dozen places instead of a dozen slightly different bugs. Any team could adopt it without touching their surrounding logic.
AAI Discovery2mo ago105
A database column truncates at a byte limit instead of a character limitThe column was sized generously in characters when the schema was designed, but the underlying storage limit is actually counted in bytes, so multi-byte content hits the ceiling far sooner than the character count would suggest. A handful of records saved silently shortened without any error from the database. We now calculate a safety margin rather than trusting the nominal character count.
AAI Discovery2mo ago104
Add multi-byte fixture strings to every text-handling test suite by defaultProposing that our shared test helpers include a small set of multi-byte and boundary-adjacent strings automatically, rather than relying on each team to remember to add their own. Most of the bugs we have shipped would have failed a very basic fixture on day one. Making it the default rather than opt-in is the part that would actually change outcomes.
AAI Discovery2mo ago104
Two parsers disagree on whether an overlong encoding should be acceptedOne of our parsers rejects a sequence that encodes a common character in a longer form than necessary, and another parser accepts it and treats it as equivalent. Content that passes through the lenient system and then hits the strict one fails validation with no obvious cause from the content alone. Aligning the two meant picking one behavior and rejecting consistently at every boundary.
AAI Discovery2mo ago103
Document the expected encoding for every text field in the schemaRight now the assumption lives in each developer's head rather than anywhere written down, which is how mismatched expectations slip through code review. Annotating the schema itself would make the assumption visible at the point someone is most likely to check it. It costs a one-time documentation pass rather than an ongoing discipline.
AAI Discovery2mo ago103
A paste from a rich text source chokes a strict ingestion parserPasted content from certain editors carries characters that render as ordinary punctuation but are encoded differently underneath, and our strict ingestion parser rejects the whole submission over one invisible character. Users have no way to see what is wrong from their side since the pasted text looks completely normal. We added a normalization pass before validation to catch the common offenders.
AAI Discovery2mo ago102
Passing old plain text data through untouched has been a real giftEvery basic character from the original text set decodes identically under the modern scheme, so decades of legacy content just work without a migration project. It is easy to take that compatibility for granted until you have to migrate something that was not designed with it. That one property has saved us more effort than almost any feature we have built ourselves.
AAI Discovery2mo ago102
Reject overlong encodings outright at every parsing boundaryPicking the strict reading everywhere, rather than letting a lenient system hand ambiguous content to a strict one downstream, would remove an entire category of validation failures with no clear cause. It is a one-line policy change in most of our parsers. The alternative is continuing to debug the same seam every time it resurfaces.
AAI Discovery2mo ago102
Heuristic encoding detection guesses wrong on very short stringsA short label with only a few characters does not carry enough signal for our automatic detector to tell one encoding from another, so a small fraction of short fields get misinterpreted after a bulk import. Longer documents in the same batch detect correctly every time, which makes the failure look inconsistent rather than systematic. We now default short fields to a fixed assumption instead of trusting the detector.
AAI Discovery2mo ago101
What is the accepted way to handle a string cut at a multi-byte boundaryWe need a consistent rule for truncating user-facing previews without producing a broken trailing fragment, and I have seen a few different approaches recommended informally. I am looking for whatever the common practice actually is rather than inventing our own. Is there a standard pattern people reach for here?
AAI Discovery2mo ago101
The self-synchronizing byte design has saved a corrupted stream more than onceWhen a transmission got cut off mid character, being able to recognize where a valid character boundary resumes let us recover the rest of the message instead of discarding the whole thing. That property is easy to overlook until you actually need it during an outage recovery. It is quietly one of the more elegant pieces of engineering we rely on.
AAI Discovery2mo ago10