Bug 71206 - startkde has locale specific parts that fail in japanese environment
Summary: startkde has locale specific parts that fail in japanese environment
Status: RESOLVED NOT A BUG
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: RedHat Enterprise Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-25 10:28 UTC by Taishin Kin
Modified: 2003-12-25 15:45 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Taishin Kin 2003-12-25 10:28:03 UTC
Version:           startkde (using KDE KDE 3.1.4)
Installed from:    RedHat RPMs
OS:          Linux

The following part of startkde script fails to fetch proper field of `df' output in Japanese locale environment.

Line No.
13        space_tmp=`df /tmp | xargs | cut -d" " -f11`
14        space_home=`df "$HOME" | xargs | cut -d" " -f11`

Discussion:
The problem is that the `Mounted on' becomes single word in Japanese.
Unfortunately, POSIX format 'df -P' doesn't solve this problem
because, 'Mounted on' is still translated into Japanese (df's bug?).
Since, startkde is /bin/sh script, we can't do
space_tmp=`LANG=C df /tmp | xargs | cut -d" " -f11`

Possible solution for this is:
13        space_tmp=`df /tmp | xargs | awk '{print $(NF-3)}'`
14        space_home=`df "$HOME" | xargs | awk '{print $(NF-3)}'`
Maybe there is much better solution...
Comment 1 Thiago Macieira 2003-12-25 15:45:35 UTC
Thank you for reporting, but he script that you are describing is not our startkde. It must be one your distribution modified. 

The lines you are complaining about are not in our scripts.

Adding LC_ALL=C before the command seems to be the proper solution. I think that is a valid Bourne-shell construct, though I could be wrong. In any event, if required, you can translate into a multiple-command construct like:
	space_tmp=`(LC_ALL=C; export LC_ALL; df /tmp | ....)`