LANG and LC_TIME are set to Japanese UTF-8.
Temporarily override every locale category to C.
Which setting is appropriate?
LC_ALL is the highest-priority override for all locale categories, including individual LC_* variables and LANG.
Detailed explanation
LANG=CIncorrect. LANG is overridden by an existing LC_TIME and by LC_ALL.
LC_TIME=CIncorrect. This changes only the time category.
LC_CTYPE=CIncorrect. This changes only character classification.
LC_ALL=CCorrect. LC_ALL=C overrides all categories.
Try it yourself
An example you can run in a temporary verification environment.
LANG=ja_JP.UTF-8 LC_TIME=ja_JP.UTF-8 LC_ALL=C locale | sed -n '1,6p'Expected result
各LC_*の有効値がCとなる表示Key points
- LC_ALL has highest priority
- It overrides LC_*
- Useful as a temporary override
Notes
- Environment: POSIX locale / 子プロセス環境だけ変更
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Locale category
A setting that controls language, numeric formatting, collation, or date display.
Character encoding
A mapping between characters and the bytes used to represent them.
Timezone
A rule set that converts timestamps for a region or display context.