[Bug 295666] Locale entries dropped during unicode/non-unicode Makefile split: setlocale() returns NULL for nl_BE.ISO8859-{1,15}, hr_HR.ISO8859-2, sr_RS.ISO8859-2, zh_TW.Big5
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 295666] Locale entries dropped during unicode/non-unicode Makefile split: setlocale() returns NULL for nl_BE.ISO8859-{1,15}, hr_HR.ISO8859-2, sr_RS.ISO8859-2, zh_TW.Big5"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 295666] Locale entries dropped during unicode/non-unicode Makefile split: setlocale() returns NULL for nl_BE.ISO8859-{1,15}, hr_HR.ISO8859-2, sr_RS.ISO8859-2, zh_TW.Big5"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 28 May 2026 14:15:43 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295666
Bug ID: 295666
Summary: Locale entries dropped during unicode/non-unicode
Makefile split: setlocale() returns NULL for
nl_BE.ISO8859-{1,15}, hr_HR.ISO8859-2,
sr_RS.ISO8859-2, zh_TW.Big5
Product: Base System
Version: 15.0-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: bin
Assignee: bugs@FreeBSD.org
Reporter: shirley.s@dell.com
Commit 0a36787e4c1f ("locales: separate unicode from other locales",
https://cgit.freebsd.org/src/commit/?id=0a36787e4c1fa0cf77dcf83be0867178476e372b,
https://github.com/freebsd/freebsd-src/commit/0a36787e4c1fa0cf77dcf83be0867178476e372b)
split the locale category Makefiles into unicode and non-unicode variants (e.g.
share/msgdef/Makefile and share/msgdef_unicode/Makefile). During this split,
several cross-encoding SAME entries were dropped because the source was a UTF-8
locale and the target was an ISO8859 locale, so they didn't fit cleanly into
either file.
As a result, on a clean 15.0 install, the following setlocale() calls return
NULL:
setlocale(LC_MESSAGES, "nl_BE.ISO8859-1") → NULL
setlocale(LC_MESSAGES, "nl_BE.ISO8859-15") → NULL
setlocale(LC_MESSAGES, "hr_HR.ISO8859-2") → NULL
setlocale(LC_MESSAGES, "sr_RS.ISO8859-2") → NULL
setlocale(LC_NUMERIC, "zh_TW.Big5") → NULL
The locale directories exist (created by other categories like LC_COLLATE,
LC_CTYPE, LC_MONETARY, LC_TIME), but the specific category files are missing.
The pre-split Makefile had cross-encoding entries like:
SAME+= nl_NL.UTF-8 nl_BE.ISO8859-1
SAME+= sr_RS.UTF-8@latin hr_HR.ISO8859-2
But these were dropped during the split.
For zh_TW.Big5, its LOCALES+= entry was dropped from numericdef/Makefile even
though zh_TW.Big5.src still exists in the tree.
Proposed fix: Add non-Unicode-only entries that stay within each Makefile's
domain:
# share/msgdef/Makefile
SAME+= nl_NL.ISO8859-15 nl_BE.ISO8859-15
SAME+= nl_NL.ISO8859-15 nl_BE.ISO8859-1
SAME+= sl_SI.ISO8859-2 hr_HR.ISO8859-2
SAME+= sl_SI.ISO8859-2 sr_RS.ISO8859-2
# share/numericdef/Makefile
LOCALES+= zh_TW.Big5
The ISO8859 source files (nl_NL.ISO8859-15/LC_MESSAGES,
sl_SI.ISO8859-2/LC_MESSAGES) are byte-identical to their UTF-8 counterparts
because LC_MESSAGES content (yes/no patterns) is pure ASCII.
Note: Systems upgraded from FreeBSD 13 (or earlier) may not see the failure
because stale symlinks from the pre-split installation survive installworld,
which I will file another bug for and link to this issue.
--
You are receiving this mail because:
You are the assignee for the bug.