pgjdbc/pgjdbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: vlsi (@vlsi) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: [pgjdbc/pgjdbc] PR #4115: i18n: convert ISO-8859-x .po files to UTF-8
Date: Tue, 26 May 2026 15:08:11 +0000
Message-ID: <[email protected]> (raw)
## What
Re-encode five translation files from legacy 8-bit encodings to UTF-8 and update the `Content-Type` charset declaration to match. No other changes.
| file | was | now |
| --- | --- | --- |
| `cs.po` | ISO-8859-2 | UTF-8 |
| `de.po` | ISO-8859-1 | UTF-8 |
| `fr.po` | ISO-8859-1 | UTF-8 |
| `it.po` | ISO-8859-1 | UTF-8 |
| `nl.po` | ISO-8859-1 | UTF-8 (file body is pure ASCII; only the header changed) |
The other 11 `.po` files were already UTF-8 with a matching header and are untouched.
## Why
The translation sources used a mix of encodings, which makes tooling (editors, grep, diff viewers, future xgettext runs) treat the files inconsistently. Standardising on UTF-8 lets every `.po` file in the tree be opened, searched, and patched the same way, and is the de-facto modern default for gettext catalogues.
GitHub diffs looks better for UTF-8 files.
Here's an example from `cs.po`:
<img width="511" height="59" alt="cs po" src="https://github.com/user-attachments/assets/2d3d565c-3fd3-4645-a6d7-365bb6a36d4c"; />
## How to verify
For each converted file, round-trip the new version back through `iconv` to its original encoding and diff against the parent commit. Only the single `Content-Type` line should differ:
```sh
for entry in "cs.po:ISO-8859-2" "de.po:ISO-8859-1" "fr.po:ISO-8859-1" \
"it.po:ISO-8859-1" "nl.po:ISO-8859-1"; do
f="${entry%%:*}"; src="${entry##*:}"
cur="pgjdbc/src/main/java/org/postgresql/translation/$f"
diff <(git show "HEAD~1:$cur") <(iconv -f UTF-8 -t "$src" "$cur")
done
```
Each diff shows exactly one changed line: `charset=<old>` -> `charset=UTF-8`.
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: github://pgjdbc/pgjdbc
Cc: [email protected], [email protected]
Subject: Re: [pgjdbc/pgjdbc] PR #4115: i18n: convert ISO-8859-x .po files to UTF-8
In-Reply-To: <<[email protected]>>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox