Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 309909

Summary: sys-fs/e2fsprogs: badblock output broken with UTF8 locales
Product: Gentoo Linux Reporter: Xake <kanelxake>
Component: New packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: galtgendo, tytso
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://sourceforge.net/tracker/?func=detail&aid=3030219&group_id=2406&atid=102406
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Proposed Fix

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