From unknown Sun Aug 17 22:05:41 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#15597 <15597@debbugs.gnu.org> To: bug#15597 <15597@debbugs.gnu.org> Subject: Status: bug-parted Digest, Vol 131, Issue 9 Reply-To: bug#15597 <15597@debbugs.gnu.org> Date: Mon, 18 Aug 2025 05:05:41 +0000 retitle 15597 bug-parted Digest, Vol 131, Issue 9 reassign 15597 parted submitter 15597 Rod Smith severity 15597 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 12 12:33:36 2013 Received: (at submit) by debbugs.gnu.org; 12 Oct 2013 16:33:36 +0000 Received: from localhost ([127.0.0.1]:44534 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VV28F-0005Bi-8W for submit@debbugs.gnu.org; Sat, 12 Oct 2013 12:33:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48154) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VV28C-0005Bb-7N for submit@debbugs.gnu.org; Sat, 12 Oct 2013 12:33:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VV286-0004oG-Io for submit@debbugs.gnu.org; Sat, 12 Oct 2013 12:33:32 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:35527) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VV286-0004oC-G9 for submit@debbugs.gnu.org; Sat, 12 Oct 2013 12:33:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49828) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VV281-0006qk-71 for bug-parted@gnu.org; Sat, 12 Oct 2013 12:33:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VV27v-0004lg-Mg for bug-parted@gnu.org; Sat, 12 Oct 2013 12:33:21 -0400 Received: from eastrmfepo202.cox.net ([68.230.241.217]:53941) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VV27v-0004lP-IN for bug-parted@gnu.org; Sat, 12 Oct 2013 12:33:15 -0400 Received: from eastrmimpo110 ([68.230.241.223]) by eastrmfepo202.cox.net (InterMail vM.8.01.05.09 201-2260-151-124-20120717) with ESMTP id <20131012163313.SKTE3871.eastrmfepo202.cox.net@eastrmimpo110> for ; Sat, 12 Oct 2013 12:33:13 -0400 Received: from nessus.rodsbooks.com ([98.182.36.23]) by eastrmimpo110 with cox id cGZD1m0070Vxc5u01GZD3W; Sat, 12 Oct 2013 12:33:13 -0400 X-CT-Class: Clean X-CT-Score: 0.00 X-CT-RefID: str=0001.0A020204.525979C9.0079,ss=1,re=0.000,fgs=0 X-CT-Spam: 0 X-Authority-Analysis: v=2.0 cv=NeA4IR/4 c=1 sm=1 a=5/GQi7ztvdfnmBZvbhqgsw==:17 a=P66V9xvxFGMA:10 a=jaQXcjyXAqUA:10 a=-oC7iYvNpoQA:10 a=8nJEP1OIZ-IA:10 a=28bguoTQAAAA:8 a=lf86WEhIQn0A:10 a=fxJcL_dCAAAA:8 a=0homCqhpAAAA:8 a=TVkev9qf_n93KYuB1EUA:9 a=wPNLvfGTeEIA:10 a=2eKvNQJKnqYA:10 a=_YepGT1rgiMA:10 a=5/GQi7ztvdfnmBZvbhqgsw==:117 X-CM-Score: 0.00 Authentication-Results: cox.net; none Received: from [192.168.1.2] (nessus.rodsbooks.com [192.168.1.2]) by nessus.rodsbooks.com (Postfix) with ESMTP id EDFECAAE799 for ; Sat, 12 Oct 2013 12:33:12 -0400 (EDT) Message-ID: <525979C8.7030106@rodsbooks.com> Date: Sat, 12 Oct 2013 12:33:12 -0400 From: Rod Smith User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130925 Thunderbird/17.0.9 MIME-Version: 1.0 To: bug-parted@gnu.org Subject: Re: bug-parted Digest, Vol 131, Issue 9 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) On 10/12/2013 12:01 PM, Phillip Susi wrote: > 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. The standard says they're "strings," and the default for strings in UEFI is UTF-16LE/UCS-2. > 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 ). I agree with you. I haven't studied the parted code on this score, so I don't have any specific suggestions for how to do it in parted. I can offer my experiences with doing it in GPT fdisk (http://www.rodsbooks.com/gdisk/), though: I used libicu (http://site.icu-project.org/) to do the translation. This seems to work pretty well -- at least, it produces results that are inter-operable with what Apple's tools do. You can check the gdisk source code, and particularly the gptpart.cc file, to see how gdisk does it. Search for "UnicodeString" to find what it does. It's been a while since I added libicu support, and I haven't made many changes to it since then, so I don't recall every detail of what I did. I seem to recall that it wasn't really very hard, but I did need to change quite a few output functions to use the libicu calls. FWIW, when I added libicu support to gdisk, I kept the option to compile without libicu, in which case gdisk mangles non-ASCII characters in much the way parted does. Thus, you'll see both sets of code in gdisk. As a practical matter, libicu is a rather large library, and some developers of small emergency disks don't want to include it, so keeping the option to not use libicu is worthwhile. Note that some values are invalid even with libicu, so there's a possibility that you'll run into error conditions, whether using libicu or not. Obviously, sane error handling is better than having the code bail out. -- Rod Smith rodsmith@rodsbooks.com http://www.rodsbooks.com From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 14 13:50:42 2013 Received: (at control) by debbugs.gnu.org; 14 Oct 2013 17:50:42 +0000 Received: from localhost ([127.0.0.1]:49231 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VVmHy-0000p2-2M for submit@debbugs.gnu.org; Mon, 14 Oct 2013 13:50:42 -0400 Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.120]:39155) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VVmHq-0000ok-NS for control@debbugs.gnu.org; Mon, 14 Oct 2013 13:50:39 -0400 X-Authority-Analysis: v=2.0 cv=N/mr5hBB c=1 sm=0 a=/DbS/tiKggfTkRRHPZEB4g==:17 a=Qsx_du5GiBkA:10 a=sCfsyOEanakA:10 a=4xGza5WrNBEA:10 a=S1A5HrydsesA:10 a=8nJEP1OIZ-IA:10 a=fxJcL_dCAAAA:8 a=KGjhK52YXX0A:10 a=IbrB8of2KH0A:10 a=eAW4V0x159Bbr_Oqom4A:9 a=wPNLvfGTeEIA:10 a=5ffwx4AglO4A:10 a=pFslaYIHIiIA:10 a=B9cvR--qHFsA:10 a=/DbS/tiKggfTkRRHPZEB4g==:117 X-Cloudmark-Score: 0 X-Authenticated-User: X-Originating-IP: 67.78.168.186 Received: from [67.78.168.186] ([67.78.168.186:55349] helo=[10.1.1.236]) by cdptpa-oedge03.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id 74/7C-06764-8EE2C525; Mon, 14 Oct 2013 17:50:33 +0000 Message-ID: <525C2EE8.1010209@ubuntu.com> Date: Mon, 14 Oct 2013 13:50:32 -0400 From: Phillip Susi User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: control@debbugs.gnu.org Subject: Re: bug#15597: bug-parted Digest, Vol 131, Issue 9 References: <525979C8.7030106@rodsbooks.com> In-Reply-To: <525979C8.7030106@rodsbooks.com> X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) merge 15597 15591 thanks From unknown Sun Aug 17 22:05:41 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 21 Jan 2014 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator