-
Notifications
You must be signed in to change notification settings - Fork 38
Description
I'm working on my own implementation of an SSH agent program that uses KeePass/KeeAgent files. In the process I've discovered that the KeeAgent.Settings files created by KeeAgent and by KeePassXC are UTF-16 encoded without a BOM. This can best be observed by opening the KeeAgent.settings file with the KeePass 2.x internal file viewer in hex mode, which shows the file beginning with 0x3C 00 instead of the 0xFF FE BOM expected for little endian UTF-16. Since the file is encoded UTF-16, The XML 1.0 Standard, section 4.3.3 states, in part: "Entities encoded in UTF-16 MUST and entities encoded in UTF-8 MAY begin with the Byte Order Mark".
This was a quite a surprise when I discovered that was the reason my XML parser was crashing. Apparently it's more of a stickler for standards than the one used in KeeAgent or KeePassXC. I understand completely if this is a WONTFIX, since KeeAgent and KeePassXC seem to be able to handle it as is, and handling cases with and without a BOM would be more work, and it would have to be maintained forever for backward compatibility. I just wanted to mention this in case people weren't aware.
Thanks!