You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Exports don't say when they drop control characters (KML, GPX), when text is cut at a NUL (Shapefile), or KML fields named like its own columns #2415
Three more silent losses on export, found while working on #1907 (#2414). Each changes text with no notice:
Control characters (KML, GPX): the writer drops control characters from names and data values (interop::xml()). So "a\u{1}" is written as a, and the change isn't said. It also hides the Exports don't say when text is trimmed, blank text becomes null, or an empty field is left out #1907 notices: "a \u{1}" is written as a and read back as a, but the export counts the value before the characters are dropped, so the trim isn't counted either.
NUL bytes (Shapefile): reading a .dbf cuts text at the first NUL byte, so "ab\0cd" reads back as "ab" and "\0x" as null.
KML fields named like the reader's own columns: a field called folder or style whose values all match the reader's column of that name is dropped on read.
Each needs an export notice with a count and the fields, like the #1907 notices.
More found in review of #2414, all from before it:
A leading apostrophe (CSV): text such as '=x isn't guarded on write, since it already starts with ', but reading takes the ' off as a guard. So it comes back as =x.
A field with a blank name (KML): it's written as <Data name="">, and reading drops every entry with a blank name. So the column and all its values are gone.
Parts of a feature (KML, GPX): reading keeps a feature but drops its parts that don't fit: a line part with fewer than 2 points in range, a polygon after the first with an outer ring under 3, and a multipoint's points outside longitude/latitude. fix(data): exports say text that reading the file back trims or reads as null (#1907) #2414 says when a whole feature won't read back, but not these.
I'll add a counted export notice, naming the fields, as #1907's are, for each of the three that remain:
NUL bytes (Shapefile): text with a NUL in what the .dbf keeps. Reading keeps only the text before it, and a value starting with one reads as empty. This goes in TextLosses, under its Dbf read.
A leading apostrophe (CSV): text like '=x, whose apostrophe reading takes for the formula guard and drops. This also goes in TextLosses, under its Cell read. No way of writing it reads back exactly with today's reader, so it's said rather than changed.
A blank field name (KML): a field whose name is blank once trimmed, written as <Data name="">. Reading drops every such entry, so the column and its values are gone. This goes next to kml_empty_fields_note.
Tests both ways: each loss written and read back gives its notice with the count and the fields, and clean text gives none. Each test fails on main first.
Everything here is covered on main now. Control characters in KML and GPX are refused with an error since #2174, vertices that don't read back are counted since #2414, and #2749 added the NUL, CSV apostrophe and blank KML field name notices (thanks @bearinmindcat). Closing.
Activity
flight1973 commentedon Nov 18, 2026
More found in review of #2414, all from before it:
'=xisn't guarded on write, since it already starts with', but reading takes the'off as a guard. So it comes back as=x.<Data name="">, and reading drops every entry with a blank name. So the column and all its values are gone.bearinmindcat commentedon Nov 22, 2026
I'll take the parts of this that are still open on main (9cc7d88). I checked the comments and the open PRs, and found no claim or PR.
Already handled on main:
interop::xmlnow refuses text XML can't hold, naming the field and the character, rather than dropping it (fix(data): preserve descriptions across KML round trips #2174).folderorstyle: these come back under their own names (tests inkml.rs).lost_vertices).I'll add a counted export notice, naming the fields, as #1907's are, for each of the three that remain:
.dbfkeeps. Reading keeps only the text before it, and a value starting with one reads as empty. This goes inTextLosses, under itsDbfread.'=x, whose apostrophe reading takes for the formula guard and drops. This also goes inTextLosses, under itsCellread. No way of writing it reads back exactly with today's reader, so it's said rather than changed.<Data name="">. Reading drops every such entry, so the column and its values are gone. This goes next tokml_empty_fields_note.Tests both ways: each loss written and read back gives its notice with the count and the fields, and clean text gives none. Each test fails on main first.
fix(data): text before a NUL loses its trailing spaces as other Shape…
fix(data): exports say text that a NUL, a CSV apostrophe or a blank K…
flight1973 commentedon Nov 28, 2026
Everything here is covered on main now. Control characters in KML and GPX are refused with an error since #2174, vertices that don't read back are counted since #2414, and #2749 added the NUL, CSV apostrophe and blank KML field name notices (thanks @bearinmindcat). Closing.