Ctrl chars in Brother's Keeper export Gedcom file

Hi,
I’m using Gramps 6.0.6 on Windows-11-64b.
First, I import in Gramps a Brother’s Keeper Gedcom with such source records
0 @S69@ SOUR
1 AUTH Belgique, Luxembourg, registres d’état civil, 1580-1920, Hotton
1 TITL Actes 1841-1880

Then from Gramps, I export the same db in a Gedcom, and I get those records

0 @S0069@ SOUR
1 TITL Actes 1841-1880
1 AUTH Belgique, Luxembourg, registres d’état civil, 1580-1920, Hotton

Its’n not visible here, but in the word ‘détat’, there is a control character after the letter ‘d’

Any idea on how to avoid this problem ?
Thanks

Which version of Brother’s Keeper was used to export? Hopefully, it was version 7 and you can export again using different character encoding options.

I seem to recall that Brother’s Keeper defaulted to ANSEL multi-character diacritics and extended character set symbols. That ANSEL encoding was a non-standard format. And the older versions didn’t offer the choices with the expected labeling.

For GEDCOM 5.5.1, the export should be with UTF-8 or Unicode encoding to avoid the problem. You should be able to export again with a more flexible character encoding option.

For more information, scroll down to the “— Character Sets:” section of the following GenealogyTools.com article by Keith Riggle.

Before you do anything else…

Check the Gedcom header and see what the char-encoding on each exported files says.

And, do the source have the correct character inside Gramps…

If it is wrong in Gramps, you could start by open the Gedcom in a advanced text editor like NotePad++ or Visual Studio Code and change the character set to UTF–8 in the header of the Gedcom, and then set the Character set encoding for the file to the same before saving it again…

I had the same problem with Gedcom files from Legacy the first times I tried to import to Gramps 5, with Nordic Characters.

Legacy wrote a UTF-8 TAG in the Gedcom header, but actually encoded the file as ANSEL.

2 Likes

However, there is a difference in treatment depending on the type of data…
If the character ’ is present in a NAME field, it is correctly imported into Gramps and exported from Gramps.
If it is present in a source field, the character is transformed…
Here are some excerpts (in which the entire HEADER is reproduced)

From Brother’s Keeper

0 HEAD
1 SOUR BROSKEEP
2 VERS 7.6.1 WINDOWS
1 DEST BROSKEEP (BK)
1 DATE 15 NOV 2025
1 CHAR ANSI
1 FILE T:\GEDCOM’s\Test-pour-Gramps.GED
1 GEDC
2 VERS 5.5.1
2 FORM LINEAGE-LINKED
1 SUBM @SUB1@
0 @SUB1@ SUBM
1 NAME Michel
0 @I1@ INDI
1 NAME François /MyName d’Ici/


Then, export from Gramps

0 @I0001@ INDI
1 NAME François /MyName d’Ici/

its ANSI encoded in the header, you should begin with checking that the file encoding also is ANSI.

Or you could as I wrote before, try to convert it to UTF-8 and change the header “CHAR” to UTF-8 to.
on Windows you can use Notepad++ or VSC for this.

If that doesn’t fix it, it may be that some of the fields in Gramps have the wrong encoding???

One of the developers need to answer the last part…

Both ANSI and ANSEL gave me trouble with the Legacy exports in different ways, so I always ended up converting the Gedcom files in NPP before importing to Gramps.
Even the UTF-8 export from Legacy gave problems… often the header stated one thing and the file encoding something different.

2 Likes

You might want to check the Brother’s Keeper exported GEDCOM file with a hex editor too.

Check if the apostrophe in the title of the source is the same character as the one in the surname of the person. I suspect that they are not.

Gramps stores all fields as unicode. You can see that the Gedcom AnsiReader uses a TextIOWrapper with its encoding set to “latin1” to provide the conversion.

I can’t see that Nick, I’m net that good at reading code…

That’s why I said one of the developers had to answer that part…

This is the problem indee…
The apostrophe in the NAME field is x27 (a real apostrophe)
Those in SOUR are x92 (a right-handed single quotation mark, cut and paste from archive sites, I gues)

Solution : I leave ANSI export from Brother’s Keeper and I edit the Gedcom file to change all x92 to x27 before importing in Gramps.
ANSI because other exportation options utf8 i.e, give other problems…
Thanks all for your messages.

2 Likes

Great @Michel152 ! Welcome to Gramps.

Let us know how you progress. And do not hesitate to ask questions.

I suggest that you download the PDF of the wiki User Manual. (There is a fr and a nl version if that is the language of your GUI.) The PDF is much easier to search than the website.

Also, the add-ons are incredibly varied and useful. Don’t avoid them.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.