Red Hat Bugzilla – Bug 543029
parted print command failed using ru_RU.UTF-8
Last modified: 2009-12-18 05:37:56 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
Steps to Reproduce:
1. LANG=ru_RU.UTF-8 parted
2. > print
Error message. Program is terminated.
List of partitions for device
Running parted with LANG=C works well. I suppose problem is related to Russian translation.
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 :)
This message is defined in /usr/share/locale/ru/LC_MESSAGES/libc.mo
msgid "Invalid or incomplete multibyte or wide character"
msgstr "Неверный или неполный мультибайтный или широкий знак"
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
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.
If I made this string little bit shorter everything is fine.
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.
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:
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.
parted-1.9.0-17.1.fc12 has been submitted as an update for Fedora 12.