I am adding a little data to dwarfexport (see above) and I am sorely tempted to fix something that has been driving me nuts for a long time:
When a dwarf lacks a middle name, dwarfexport writes the dwarf's first name twice in the XML <Name> attribute, followed by the surname(s).
For example, let's say you have nicknames set to [NICKNAME_DWARF:REPLACE_FIRST] or [NICKNAME_DWARF:CENTRALIZE] in d_init.txt. You have two dwarves, Urist Bistoksazir and `Bubbles' Zimeshinod (whose original first name was Zasit). You run dwarfexport. Dwarfexport writes <Name>Urist Urist Bistoksazir</Name> for Urist, and <Name>Zasit `Bubbles' Zimeshinod</Name> for Bubbles. (For completeness' sake, you'll get the same thing for Urist, and <Name>`Bubbles'</Name> for Bubbles, if your d_init.txt has the other nickname option, [NICKNAME_DWARF:REPLACE_ALL].)
I tentatively made a correction to dwarfexport, so that dwarves with no nickname just have their first name printed once in the <Name> attribute. So, Urist's record is always <Name>Urist Bistoksazir</Name>). (And, dwarves with nicknames behave exactly the same way as they do currently.)
BUT !
I don't know if anyone else is relying on dwarfexport's duplicated first names. (One of my applications relies very heavily on dwarfexport, but I don't know whether other DFHackers are using dwarfexport.) If anyone wants to keep the duplicate names, I will keep my hands off, and perhaps add a <CorrectName> attribute or something, that doesn't have first name duplication.
TLDR: Is anyone relying on duplicate first names, for dwarves lacking a nickname, in the <Name> attribute from dwarfexport?