Forum > Translations
Why Lasarus tries to save PO files in ISO-8859-1 ?
(1/1)
mm7:
When a resourcestring changed, Lasarus merges that into PO files. The PO files should be UTF-8.
But Lazarus shows error messages like the following:
Saving file "/fs02/home/mark/MyProjects/freeship-plus-in-lazarus/locale/FreeShip.cn.po" as "ISO-8859-1" looses characters at line 2851, column 5.
If I click [Cancel] it may leave the file with 0 length.
If I click [Ignore] it saves somewhat UTF-8, but some characters saved in ISO.
It happens when a resourcestring has a non ISO-8859-1 chars.
Like UTF-8 degree sign °. Instead of writing hex C2 B0, it writes just B0.
I tried to find if non-ISO-8859-1 chars are prohibited in resourcestrings.
I could not find it neither in Lasarus nor in GetText docs.
What to do?
mm7:
I figured this out.
It is weird, though.
The PO files must have following header.
--- Code: Text [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---# FreeShip for Lazarus# Copyright (C) 2024 Free Software Foundation, Inc.# Author <email>, 2024.msgid ""msgstr """Project-Id-Version: \n""PO-Revision-Date: 2024-08-15 21:22-0400\n""Last-Translator: AUTHOR <email>\n""Language-Team: TEAM <email>\n""Language: Language\n""MIME-Version: 1.0\n""Content-Type: text/plain; charset=UTF-8\n""Content-Transfer-Encoding: 8bit\n" Not sure which fields are critical, but previously there was just
"Content-Type: text/plain; charset=UTF-8\n"
And it was not enough. Lazarus saved mixed UTF-8 and ISO corrupted files.
Navigation
[0] Message Index