From: John R. <jr...@ce...> - 2014-02-10 16:19:31
|
On Feb 9, 2014, at 11:53 PM, Jerome <rom...@ya...> wrote: > Note, Byte Order Mark is not supported by gnu gettext files! > > https://www.gramps-project.org/wiki/index.php?title=Translating_Gramps#Getting_started > http://achilles-keep-moving.blogspot.de/2011/10/msgfmt-fatal-error-with-utf-8-with-bom.html > > I quickly looked if there was any BOM into current source (grep , > hexdump), but I do not know if it is important anywhere else than on > *.po files? > > If there is only ASCII characters then we should have no problem with > encoding declaration, even with 'iso-8859-1'! > See http://en.wikipedia.org/wiki/UTF-8#Byte_order_mark Summary: A byte order mark is neither required nor desired for UTF8. It *is* necessary for UTF16, but Python3's codec is smart enough to strip the BOM when it returns UTF8. The message catalogs don't have BOMs because they're all in UTF8. Since gettext doesn't like BOMs encoded into UTF8, it's a good thing. Regards, John Ralls |