Expand description
Turning the bytes of a GEDCOM file into text.
This is a layer of its own because getting it wrong silently rejects most
real files. A byte-order mark is the common case — every GEDCOM 7 file
gedcom.io publishes carries one, as does every export from Family Tree
Maker 24, Legacy 10, RootsMagic 8, and Ancestris 11 — and an unstripped mark
makes the first line unparseable for a reason that names the wrong thing.
Older files are not UTF-8 at all. GEDCOM 5.5 defaults to ANSEL, a 1980s
library-cataloguing set whose diacritics precede the letter they modify,
and files declaring ANSI are Windows-1252 in practice.
Nothing here guesses in silence. Every decision, and every disagreement between what a file declares and what it contains, is reported so the import preview can show it before anything is written.
Structs§
- Encoding
Report - What decoding did, and what it had to decide.
Enums§
- Gedcom
Encoding - The character encoding a GEDCOM file was read as.
Constants§
- WINDOWS_
1252_ HIGH - The five positions Windows-1252 leaves undefined map to the C1 control they sit on, which keeps the text the same length and loses nothing meaningful.
Functions§
- decode_
gedcom - Reads GEDCOM bytes as text, choosing an encoding and reporting the choice.
- decode_
gedcom_ with - Reads GEDCOM bytes as text with explicit limits.