Comment 1 for bug 812666

Revision history for this message
Clinton Blackmore (clinton-blackmore) wrote :

I finally figured it out!

After running 'file' on translations in Enchanting, and being told they were "Non-ISO extended ASCII files", while the ones in Scratch were identified as Unicode files, I looked where the files differed at the byte level ... and didn't learn much. Finally, I had to find out how UTF-8 files are encoded, which was interesting, and now understand what was going on. When the .po files are exported, the English text is exported (as ASCII), and then the translation is exported (at UTF-8). This works fine, as ASCII is a subset of UTF-8, except when you use a non-ASCII extended character, like the degrees symbol. I have changed the export code to convert the English to UTF-8 before exporting, and made the string lookups convert the English to UTF-8 when trying to find a match ... and it works. I also added a script that will fix (or mostly fix -- I've still got to check if there are some defects) existing .po files.