Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 309909 - sys-fs/e2fsprogs: badblock output broken with UTF8 locales
Summary: sys-fs/e2fsprogs: badblock output broken with UTF8 locales
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://sourceforge.net/tracker/?func...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-17 08:27 UTC by Xake
Modified: 2010-12-29 06:48 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Proposed Fix (patch-for-309909,19.94 KB, text/plain)
2010-08-02 02:34 UTC, Theodore Tso
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xake 2010-03-17 08:27:59 UTC
$ locale
LANG=sv_SE.UTF-8
LC_CTYPE="sv_SE.UTF-8"
LC_NUMERIC="sv_SE.UTF-8"
LC_TIME="sv_SE.UTF-8"
LC_COLLATE="sv_SE.UTF-8"
LC_MONETARY="sv_SE.UTF-8"
LC_MESSAGES="sv_SE.UTF-8"
LC_PAPER="sv_SE.UTF-8"
LC_NAME="sv_SE.UTF-8"
LC_ADDRESS="sv_SE.UTF-8"
LC_TELEPHONE="sv_SE.UTF-8"
LC_MEASUREMENT="sv_SE.UTF-8"
LC_IDENTIFICATION="sv_SE.UTF-8"
LC_ALL=

# badblocks -swv /dev/sde
Letar efter dåliga block i läs-skriv-läge
Från block 0 till 117246527
Testar med möns  0.39% klar, 0:10 har gåtttttttttttt

The output should be:
Testar med mönster Oxaa:   0.39% klar, 0:10 har gått

Each time that the percent counter is updated it jumps one char to the left until it reaches the leftmost border.
LC_ALL="sv_SE" and it behaves correctly.
Change "gått" in the sv.po to something without 'å' and the output will be shown correctly in UTF8.

So it seems like something in badblocks is broken for unicode.
Comment 1 Theodore Tso 2010-08-02 02:34:20 UTC
Created attachment 240993 [details]
Proposed Fix

This following patch should fix things.  Could you please confirm?

Thanks!!
Comment 2 Xake 2010-08-02 11:36:04 UTC
(In reply to comment #1)
> Created an attachment (id=240993) [details]
> Proposed Fix
> 
> This following patch should fix things.  Could you please confirm?
> 
> Thanks!!
> 

This works fine with sv_SE.UTF-8 here, thanks!
Comment 3 SpanKY gentoo-dev 2010-12-29 06:48:46 UTC
fix is part of upstream 1.41.14 release