Opened 11 months ago
Closed 4 months ago
#18734 closed bug (fixed)
LC_* envars not updated after changing "Preferred language" in Locale preflet.
Reported by: | bipolar | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta5 |
Component: | Servers/launch_daemon | Version: | R1/beta4 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description (last modified by )
After changing "Preferred language" in Locale preflet, say, from "English" to "Español (Latinoamérica)", the LC_* environmental variables under a shell session are still set to en.UTF-8
, and only updated after performing a reboot.
Seems that /system/boot/SetupEnvironment is where we set:
# Locale export LC_MESSAGES=`locale --message` export LC_NUMERIC=`locale --format` export LC_TIME=`locale --time` export LC_COLLATE=$LC_MESSAGES export LC_CTYPE=$LC_MESSAGES export LC_MONETARY=$LC_NUMERIC
Not sure if it is the best place, but... moving those to /system/settings/etc/profile
makes the reboot unnecessary, as they get updated (for new shell sessions) right after changing languages.
Sidenote:
While testing these things... I've noticed that no matter what language I choose, LC_TYPE
always has the same value: LC_TYPE=en_US.UTF-8
.
That seems to be defined by launch_daemon, originally introduced in bd1c9bf338fdae8456577c557faf36aba7b87cd5.
I couldn't find much info on LC_TYPE, and considering that it doesn't seems to be part of LC categories, and not mentioned in POSIX...
I wonder if that's a typo, meant to be LC_CTYPE
, as SetupEnvironment
also exports at its start.
Change History (5)
comment:1 by , 11 months ago
Description: | modified (diff) |
---|
comment:2 by , 11 months ago
Component: | - General → Servers/launch_daemon |
---|---|
Owner: | changed from | to
comment:5 by , 4 months ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I can still reproduce this issue, on beta4, fully updated, 32 and 64 bits.
Starting with Language and formatting both set to English:
After changing that locale to, "Spanish (Latin America)" (either language, formating, or both), I keep getting the same output for
set | ^LC
, even new bash sessions (and even after restarting Terminal).After rebooting:
---
Applying https://review.haiku-os.org/c/haiku/+/7792 solves the issue right away for me.
For reference, the sidenote about the never-changing (and typoed)
LC_TYPE
got resolved by hrev57828.