lscpu command shows "???" when messages are translated in Japanese

Bug #564698 reported by epii
12
This bug affects 2 people
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(LC_MESSAGES, "");
  + setlocale(LC_ALL, "");
    bindtextdomain(PACKAGE, LOCALEDIR);
    textdomain(PACKAGE);
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: patch
Revision history for this message
epii (epii) wrote :
tags: added: patch
Emmet Hikory (persia)
Changed in util-linux (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Francesco Cosoleto (francesco-cosoleto) wrote :
Changed in util-linux (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.