Subject: bug#15591: closed (Re: [PATCH] libparted: handle i18n gpt partition names correctly)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 23 Dec 2013 03:46:02 +0000

Your bug report

#15591: gpt mishandles non ascii partition names

which was filed against the parted package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
15591: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15591
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [PATCH] libparted: handle i18n gpt partition names correctly
From: Jim Meyering <[email-masked]>
To: Phillip Susi <[email-masked]>
Cc: [email-masked]
Date: Sun, 22 Dec 2013 19:45:06 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Perfect.  Thanks!  Marking this "done" in the bug-tracker.

Subject: gpt mishandles non ascii partition names
From: Phillip Susi <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Fri, 11 Oct 2013 14:58:57 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Original bug report:
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1238446

The gpt partition table has 16 bit characters for the name, which I
assume are supposed to be UTF-16, but the bloody uefi standard is moot
on the subject.  Currently parted simply decimates the characters,
throwing out the upper 8 bits.  This corrupts characters that aren't
simple ascii, and at some later point, strlist.c calls mbstrtowcs(),
which chokes on the corrupt name causing parted to bail out with
"Error during translation".

I think that gpt.c needs to translate the UTF-16 to the native
multibyte encoding, but I have no idea how to do that.  The C standard
conversion functions all seem to use the current locale and don't have
a way to override it if you know this string is in UTF-16 ( and maybe
the current locale is UTF-8 ).