Repository navigation
Languages: LANG keeps its UTF-8 codeset; df, gamelist.xml and theme l… - #368
Merged
Merged
Conversation
…ookups don't depend on the locale pugwash.lang set LANG (or LC_ALL) to the bare language, "ru_RU", "en_US". Where the locale exists, as on dArkOS (a full Debian with every locale), a bare name is a legacy codeset: ISO-8859-5 for ru_RU, GB2312 for zh_CN, Latin-1 for en_US. Every program PortMaster starts inherited it. Found by the PortMaster Test Suite on an RG353V with dArkOS 08282026, and checked there with harbourmaster: - df printed "Файловая система" in ISO-8859-5 (0xC4 first), get_path_fs() failed to decode it, and every port install failed (Russian, Ukrainian, Chinese, Japanese, Korean users). - gamelist.xml was written with open()'s locale default: under en_US (Latin-1) a "’" in the list made every update fail and roll back, and "é" went out as Latin-1 in a file that declares utf-8. - The theme server's renderers started with a Latin-1 filename encoding; looking up the button text "Zurück" as a file gave EPERM on exFAT, which Path.is_file() lets through, and the render crashed. So: - LANG, LC_ALL and LC_MESSAGES get "<language>.UTF-8" (LANGUAGE, a gettext list, keeps the bare language); CURRENT_LANG is still the language. - get_path_fs() runs df with LC_ALL=C, decodes leniently, and gives None when df can't be run (a CFW without df: installs go on). - gamelist.xml, gameinfo.xml, muOS's description .txt and TrimUI's config.json are written as UTF-8. - ResourceManager.find() treats a name the filesystem refuses as not found. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NxABmR1rUUgi4iicVLZchY
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ookups don't depend on the locale
pugwash.lang set LANG (or LC_ALL) to the bare language, "ru_RU", "en_US". Where the locale exists, as on dArkOS (a full Debian with every locale), a bare name is a legacy codeset: ISO-8859-5 for ru_RU, GB2312 for zh_CN, Latin-1 for en_US. Every program PortMaster starts inherited it. Found by the PortMaster Test Suite on an RG353V with dArkOS 08282026, and checked there with harbourmaster:
So:
Claude-Session: https://claude.ai/code/session_01NxABmR1rUUgi4iicVLZchY