Bug 655227
| Summary: | messed fsck.ext3 output | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Michał Piotrowski <mkkp4x4> | ||||||
| Component: | e2fsprogs | Assignee: | Eric Sandeen <esandeen> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | low | ||||||||
| Version: | 14 | CC: | esandeen, josef, kzak, oliver | ||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | e2fsprogs-1.41.12-6.fc14 | Doc Type: | Bug Fix | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2010-12-15 08:54:39 UTC | Type: | --- | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
|
Description
Michał Piotrowski
2010-11-19 22:19:29 UTC
I'm not certain where to start with this. Can you translate some of the above strings for me so I know where it is in the code? I'm no local/i18n expert, sadly. Can I reproduce this myself somehow? Thanks, -Eric misc/badblocks.c
line 201
<------>len = snprintf(line_buf, sizeof(line_buf),.
<------><------> _("%6.2f%% done, %s elapsed"),
<------><------> calc_percent((unsigned long) currently_testing,
<------><------><------><------> (unsigned long) num_blocks),.
<------><------> time_diff_format(&time_end, &time_start, diff_buf));
Translation is in
po/pl.po
line 3089
#: misc/badblocks.c:202
#, c-format
msgid "%6.2f%% done, %s elapsed"
msgstr "Gotowe w %6.2f%%, min..o %s"
I think that you can reproduce this bug by adding LANG="pl_PL"
LANG="pl_PL" sudo fsck.ext3 -cvf /dev/sdb1
IMHO removal of the polish characters from string is fully acceptable solution if the problem is not obvious to solve.
Created attachment 461670 [details]
patch that removes polish chars from translation string - fixes bug
This patch removes polish chars from translation. Please use it if there is no better solution.
Thank you for the further information! I'll try to sort this out. -Eric Is e2fsprogs the only package that's exhibiting the problem? Surely this isn't the only translation with polish characters...? I have not noticed problems with displaing polish characters in other programs. It was pointed out to me by Arkadiusz Miskiewicz that "the update function that updates timer there doesn't correctly count for multibyte locales causing little shift on the screen which in the end causes many digits written" and "wchar.h and wcslen() instead of strlen maybe will work" I'll look into that. Created attachment 461674 [details]
testcase
I created a test case that demonstrates this problem.
OMG :), I checked this test case without polish chars. It doesn't work as expected - probably I should think about re-learning C :) Ahah. Finally looked at the code. This is fixed upstream.
the 2nd assignment of "len" should fix it I think:
len = snprintf(line_buf, sizeof(line_buf),
_("%6.2f%% done, %s elapsed"),
calc_percent((unsigned long) currently_testing,
(unsigned long) num_blocks),
time_diff_format(&time_end, &time_start, diff_buf));
#ifdef HAVE_MBSTOWCS
len = mbstowcs(NULL, line_buf, sizeof(line_buf));
#endif
$ git annotate misc/badblocks.c | grep MBSTOWCS
61ef2474 (Theodore Ts'o 2010-08-01 22:30:33 -0400 206)#ifdef HAVE_MBSTOWCS
$ git show 61ef2474
commit 61ef2474c24c80a5bf0e24ba85a7506fd7651a5c
Author: Theodore Ts'o <tytso>
Date: Sun Aug 1 22:30:33 2010 -0400
badblocks: Deal with UTF-8 characters in progress message
Addresses-Gentoo-Bug: #309909
Addresses-Debian-Bug: #583782
Addresses-Debian-Bug: #587834
Signed-off-by: "Theodore Ts'o" <tytso>
...
If this is causing you trouble in F14 I could certainly pull that patch over, I think.
-Eric
It would be great. Best regards, Michal Apologies for the late action on this. I did a scratch build with the patch in place, care to test it? http://kojipkgs.fedoraproject.org/scratch/sandeen/task_2650057/ Thanks, -Eric "Apologies for the late action on this." No problem, it wasn't critical bug :) "care to test it?" Works fine. Thanks! Best regards, Michal (In reply to comment #13) > "Apologies for the late action on this." > > No problem, it wasn't critical bug :) > > "care to test it?" > > Works fine. Thanks! Great, thanks. I'll get it pushed out today. e2fsprogs-1.41.12-6.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/e2fsprogs-1.41.12-6.fc14 e2fsprogs-1.41.12-6.fc14 has been pushed to the Fedora 14 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update e2fsprogs'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/e2fsprogs-1.41.12-6.fc14 e2fsprogs-1.41.12-6.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report. |