Bug 543029 - parted print command failed using ru_RU.UTF-8
parted print command failed using ru_RU.UTF-8
Product: Fedora
Classification: Fedora
Component: parted (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Hans de Goede
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-12-01 09:39 EST by Andrew Martynov
Modified: 2009-12-18 05:37 EST (History)
1 user (show)

See Also:
Fixed In Version: parted-1.9.0-24.fc13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-12-18 05:18:43 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Andrew Martynov 2009-12-01 09:39:46 EST
Description of problem:
If parted is started in Russian locale "print" command failed and program is terminated with error "Error during translation: Неверный или неполный мультибайтный или широкий знак" 

Version-Release number of selected component (if applicable):
parted (GNU parted) 1.9.0

How reproducible:

Steps to Reproduce:
1. LANG=ru_RU.UTF-8 parted
2. > print
Actual results:
Error message. Program is terminated.

Expected results:
List of partitions for device

Additional info:
Running parted with LANG=C works well. I suppose problem is related to Russian translation.
Comment 1 Hans de Goede 2009-12-16 10:06:40 EST
Thanks for the bug report, I can reproduce this.

Can you translate the error message given when parted exits to English for me, I've no idea what it is complaining about :)
Comment 2 Andrew Martynov 2009-12-17 02:21:48 EST
This message is defined in /usr/share/locale/ru/LC_MESSAGES/libc.mo

msgid "Invalid or incomplete multibyte or wide character"
msgstr "Неверный или неполный мультибайтный или широкий знак"
Comment 3 Andrew Martynov 2009-12-17 02:49:28 EST
FYI: error was not displayed while running parted in 8bit enviroment

LANG=ru_RU.UTF-8 parted /dev/sda print    # error displayed
LANG=ru_RU.koi8-r parted /dev/sda print   # normal output displayed but garbled in UTF terminal
Comment 4 Andrew Martynov 2009-12-17 03:50:17 EST
I found text string that caused the problem:

Columns with partitions flags has "boot" flag for at least one of partitions.

If I commented out translation for this string in ru.po file everything is fine.

#msgid "boot"
#msgstr "загрузочный"

If I made this string little bit shorter everything is fine.

msgid "boot"
msgstr "загрузочны"

I think problem is related to truncating too long stings in UTF mode for partitions flags column. As mentioned before 8bit mode do not raise this issue.
Comment 5 Hans de Goede 2009-12-18 05:18:43 EST
Thanks for the additional debugging, I've fixed this and send the fix upstream.

You can download a fixed version parted-1.9.0-24.fc13 here:

Note that you will also need to update your libblkid:
Comment 6 Hans de Goede 2009-12-18 05:23:49 EST
Note that since I need to do an F-12 update for bug 546622 anyways I'll also include the fix for this in that F-12 update.
Comment 7 Fedora Update System 2009-12-18 05:37:56 EST
parted-1.9.0-17.1.fc12 has been submitted as an update for Fedora 12.

Note You need to log in before you can comment on or make changes to this bug.