Problem with locale codeset UTF-8 vs. UTF8

Bug #1394633 reported by Christophe Prigent
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-terminal (Ubuntu)
New
Undecided
Unassigned

Bug Description

Ubuntu 14.04.1 LTS
Kernel 3.18-rc5 (https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/log/?id=refs/tags/v3.18-rc5)

Pre-conditions:
----------------------
A Terminal is opened

Steps:
----------
1. Execute command: locale
2. Launch PowerTop with command: sudo powertop
3. Check tab "Overview"
4. Quit Powertop with [Ctrl] + [C]
5. Execute command: export LANG=en_US.UTF8
6. Relaunch PowerTop and check again

Actual result:
------------------
1. Command returns: LANG=en_US.UTF-8
3. PowerTop gives some durations in µs. "M-BM-5" is displayed instead of "µ"
6. "u" is displayed instead of "µ"

Expected result:
------------------------
"µ" is well displayed

Workaround:
--------------------
Execute command: "export LANG=en_US.UTF8"

Info
---------
I checked with PowerTop' maintener. It seems to be a problem with the locale codeset.
If needed, PowerTop installation:
1. Install packages: g++, autopoint, libpci-dev, autoconf, libncurses, libncurses-dev, libnl-cli, libnl-genl-dev, libtool
2. Clone sources: git clone git://github.com/fenrus75/powertop.git
3. Compile and Install:
cd powertop
./autogen.sh
./configure
make
sudo make install

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: gnome-terminal 3.6.2-0ubuntu1
Uname: Linux 3.18.0-rc5-mainline-3.18-rc5 x86_64
ApportVersion: 2.14.1-0ubuntu3.5
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Nov 20 16:53:18 2014
ExecutablePath: /usr/bin/gnome-terminal
InstallationDate: Installed on 2001-01-04 (5068 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
SourcePackage: gnome-terminal
UpgradeStatus: Upgraded to trusty on 2014-05-16 (188 days ago)

Revision history for this message
Christophe Prigent (christophe-prigent-0) wrote :
Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

This is definitely not a gnome-terminal bug. It's either the locale system, or powertop.

The correct canonical value is LANG=en_US.UTF-8 with a hyphen. You're better off using this one rather than anything else.

For figuring out what's going on with the locale system, you should use the commands "locale" and "locale charmap". If these return errors then your settings are incorrect. If these return UTF-8 then it's a bug in powertop (I assume it manually looks for the string "UTF-8" in the locale settings, rather than relying on the correct way of figuring it out which is setlocale() followed by nl_langinfo(CODESET)).

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.