lscpu command shows "???" when messages are translated in Japanese
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
util-linux (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
Binary package hint: util-linux
In Japanese environment, the output of lscpu command is garbled like as below:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
CPU(s): 4
???????????: 1
???????????: 4
CPU?????: 1
(snip)
This should be displayed as:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
CPU(s): 4
コアあたりのスレッド数: 1
ソケットあたりのコア数: 4
CPUソケット数: 1
(snip)
I examined the code and I find that this fixed the problem:
--- lscpu.c.orig 2010-04-16 21:03:50.817368836 +0900
+++ lscpu.c 2010-04-16 22:29:46.426123638 +0900
@@ -694,7 +694,7 @@
{ NULL, 0, 0, 0 }
};
- setlocale(
+ setlocale(LC_ALL, "");
bindtextdom
textdomain(
but this time, I find that column spacing is wrong.
I also fixed this problem. I will attach a patch.
Note that I am just a C beginner, please take this patch as a reference.
tags: | added: patch |
Changed in util-linux (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Low |
This issue has been fixed.
https:/ /git.kernel. org/cgit/ utils/util- linux/util- linux.git/ commit/ sys-utils/ lscpu.c? id=2f8f138883fa 57150db793ce075 14d19469d9550