Bug 543029 - parted print command failed using ru_RU.UTF-8
Summary: parted print command failed using ru_RU.UTF-8
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: parted
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Hans de Goede
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-12-01 14:39 UTC by Andrew Martynov
Modified: 2009-12-18 10:37 UTC (History)
1 user (show)

(edit)
Clone Of:
(edit)
Last Closed: 2009-12-18 10:18:43 UTC


Attachments (Terms of Use)

Description Andrew Martynov 2009-12-01 14:39:46 UTC
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:
Always

Steps to Reproduce:
1. LANG=ru_RU.UTF-8 parted
2. > print
3.
  
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 15:06:40 UTC
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 07:21:48 UTC
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 07:49:28 UTC
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 08:50:17 UTC
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 10:18:43 UTC
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:
http://koji.fedoraproject.org/koji/buildinfo?buildID=147617

Note that you will also need to update your libblkid:
http://koji.fedoraproject.org/koji/buildinfo?buildID=147011

Comment 6 Hans de Goede 2009-12-18 10:23:49 UTC
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 10:37:56 UTC
parted-1.9.0-17.1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/parted-1.9.0-17.1.fc12


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