GNU bug report logs - #18258
t0251-gpt-unicode.sh fails when the C.UTF-8 locale is unavailable

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: parted; Reported by: ludo@HIDDEN (Ludovic Courtès); dated Wed, 13 Aug 2014 11:55:01 UTC; Maintainer for parted is bug-parted@HIDDEN.

Message received at 18258 <at> debbugs.gnu.org:


Received: (at 18258) by debbugs.gnu.org; 22 Aug 2014 20:26:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 22 16:26:10 2014
Received: from localhost ([127.0.0.1]:49798 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XKvPV-0004BJ-LL
	for submit <at> debbugs.gnu.org; Fri, 22 Aug 2014 16:26:10 -0400
Received: from world.peace.net ([96.39.62.75]:55242 ident=hope6)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <mhw@HIDDEN>) id 1XKvPS-0004B9-3l
 for 18258 <at> debbugs.gnu.org; Fri, 22 Aug 2014 16:26:07 -0400
Received: from pool-74-104-33-122.bstnma.east.verizon.net ([74.104.33.122]
 helo=jojen)
 by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.72) (envelope-from <mhw@HIDDEN>)
 id 1XKvPJ-0006wU-SL; Fri, 22 Aug 2014 16:25:58 -0400
From: mhw@HIDDEN
To: Phillip Susi <psusi@HIDDEN>
Subject: Re: bug#18258: t0251-gpt-unicode.sh fails when the C.UTF-8 locale is
 unavailable
References: <87vbpwbo6m.fsf@HIDDEN> <53F361D3.4040505@HIDDEN>
Date: Fri, 22 Aug 2014 16:25:49 -0400
In-Reply-To: <53F361D3.4040505@HIDDEN> (Phillip Susi's message of "Tue, 19
 Aug 2014 10:40:19 -0400")
Message-ID: <87r4089sqa.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 18258
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 18258 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

Phillip Susi <psusi@HIDDEN> writes:

> On 8/13/2014 7:53 AM, Ludovic Court=C3=A8s wrote:
>> Hello,
>>=20
>> t0251-gpt-unicode.sh requires the C.UTF-8 locale and fails if it
>> isn=E2=80=99t available.
>>=20
>> What about:
>>=20
>> 1. Exiting with 77 when the locale is unavailable?
>>=20
>> 2. Choosing another locale, such as en_US.utf8?  As of GNU libc
>> 2.19, C.UTF-8 (or any other spelling) does not exist.
>
> How can the C locale possibly not exist on a system that is not
> totally broken?  It is the default and fallback locale when you don't
> have any locales installed.

C.UTF-8 is a non-standard Debian extension.  It is not available in
upstream GNU libc, and it is absent from other popular distributions
such as Fedora and Arch.

See:

  https://bugzilla.redhat.com/show_bug.cgi?id=3D902094
  https://bugs.archlinux.org/task/32296
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D522776

      Mark




Information forwarded to bug-parted@HIDDEN:
bug#18258; Package parted. Full text available.

Message received at 18258 <at> debbugs.gnu.org:


Received: (at 18258) by debbugs.gnu.org; 19 Aug 2014 20:11:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 19 16:11:29 2014
Received: from localhost ([127.0.0.1]:47837 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XJpke-0003Zd-GN
	for submit <at> debbugs.gnu.org; Tue, 19 Aug 2014 16:11:29 -0400
Received: from hera.aquilenet.fr ([141.255.128.1]:41724)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <ludo@HIDDEN>) id 1XJpkZ-0003ZR-Ss
 for 18258 <at> debbugs.gnu.org; Tue, 19 Aug 2014 16:11:26 -0400
Received: from localhost (localhost [127.0.0.1])
 by hera.aquilenet.fr (Postfix) with ESMTP id 746043814;
 Tue, 19 Aug 2014 22:11:22 +0200 (CEST)
Received: from hera.aquilenet.fr ([127.0.0.1])
 by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id zb1a1314hcCT; Tue, 19 Aug 2014 22:11:22 +0200 (CEST)
Received: from pluto (ADijon-554-1-104-225.w90-26.abo.wanadoo.fr
 [90.26.84.225])
 by hera.aquilenet.fr (Postfix) with ESMTPSA id 2B76513FF;
 Tue, 19 Aug 2014 22:11:22 +0200 (CEST)
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Phillip Susi <psusi@HIDDEN>
Subject: Re: bug#18258: t0251-gpt-unicode.sh fails when the C.UTF-8 locale is
 unavailable
References: <87vbpwbo6m.fsf@HIDDEN> <53F361D3.4040505@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 2 Fructidor an 222 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0xEA52ECF4
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA  D15D 77DD 95E2 EA52 ECF4
X-OS: x86_64-unknown-linux-gnu
Date: Tue, 19 Aug 2014 22:11:21 +0200
In-Reply-To: <53F361D3.4040505@HIDDEN> (Phillip Susi's message of "Tue, 19
 Aug 2014 10:40:19 -0400")
Message-ID: <87vbpob5p2.fsf@HIDDEN>
User-Agent: Gnus/5.130011 (Ma Gnus v0.11) Emacs/24.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 18258
Cc: 18258 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

Phillip Susi <psusi@HIDDEN> skribis:

> How can the C locale possibly not exist on a system that is not
> totally broken?  It is the default and fallback locale when you don't
> have any locales installed.

C always exists, but C.UTF-8 no.

Ludo=E2=80=99.




Information forwarded to bug-parted@HIDDEN:
bug#18258; Package parted. Full text available.

Message received at 18258 <at> debbugs.gnu.org:


Received: (at 18258) by debbugs.gnu.org; 19 Aug 2014 14:40:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 19 10:40:48 2014
Received: from localhost ([127.0.0.1]:47514 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XJkad-00017R-4N
	for submit <at> debbugs.gnu.org; Tue, 19 Aug 2014 10:40:48 -0400
Received: from mail-yk0-f179.google.com ([209.85.160.179]:56791)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <phillsusi@HIDDEN>) id 1XJkaW-000171-1J
 for 18258 <at> debbugs.gnu.org; Tue, 19 Aug 2014 10:40:41 -0400
Received: by mail-yk0-f179.google.com with SMTP id 142so5400166ykq.24
 for <18258 <at> debbugs.gnu.org>; Tue, 19 Aug 2014 07:40:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:message-id:date:from:user-agent:mime-version:to:subject
 :references:in-reply-to:content-type:content-transfer-encoding;
 bh=EayRh9TBFxQgqJ1mvJ4QnOqf1JdcbSKGnJ81JrJl3Lg=;
 b=KRDbNYzgLOvL2OHPJdKIWGI1Go/P6BxzHcaG53RV2ijP8NqpMw6l9KZK6VN3LFtnaT
 3hYQA+Tlh5IDNjHc5SGLeGVJP8J6LZsN/CVcgnV84YNA44Inrh9WDvCncWnNFVeROMqq
 LcBjLiJ0T6gN8N2Y6ZzenYlSPkW3buoootBeupvSBEL2GXdHZmXUa+Zg79tmPmV8zC+d
 +5t9A1NwwsZ9yTNWlqwQcDI67G8zck6/Wy1Td7QnwfSLZl9ipVPaD/hFAL+vGpNqJ+xS
 dqYbDaK8GJW00WcdB84o0MGCYEDDXLHc3PJymFWFgBJl4rLIvUqSuWN8AphrLJJQdB9+
 oLYg==
X-Received: by 10.236.100.147 with SMTP id z19mr20204969yhf.70.1408459234586; 
 Tue, 19 Aug 2014 07:40:34 -0700 (PDT)
Received: from [10.1.1.202] (fl-67-77-88-12.sta.embarqhsd.net. [67.77.88.12])
 by mx.google.com with ESMTPSA id
 z45sm42405620yhc.17.2014.08.19.07.40.34 for <multiple recipients>
 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
 Tue, 19 Aug 2014 07:40:34 -0700 (PDT)
Message-ID: <53F361D3.4040505@HIDDEN>
Date: Tue, 19 Aug 2014 10:40:19 -0400
From: Phillip Susi <psusi@HIDDEN>
User-Agent: Mozilla/5.0 (Windows NT 6.1;
 rv:24.0) Gecko/20100101 Thunderbird/24.6.0
MIME-Version: 1.0
To: =?UTF-8?B?THVkb3ZpYyBDb3VydMOocw==?= <ludo@HIDDEN>, 18258 <at> debbugs.gnu.org
Subject: Re: bug#18258: t0251-gpt-unicode.sh fails when the C.UTF-8 locale
 is unavailable
References: <87vbpwbo6m.fsf@HIDDEN>
In-Reply-To: <87vbpwbo6m.fsf@HIDDEN>
X-Enigmail-Version: 1.6
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 18258
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 8/13/2014 7:53 AM, Ludovic Courtès wrote:
> Hello,
> 
> t0251-gpt-unicode.sh requires the C.UTF-8 locale and fails if it
> isn’t available.
> 
> What about:
> 
> 1. Exiting with 77 when the locale is unavailable?
> 
> 2. Choosing another locale, such as en_US.utf8?  As of GNU libc
> 2.19, C.UTF-8 (or any other spelling) does not exist.

How can the C locale possibly not exist on a system that is not
totally broken?  It is the default and fallback locale when you don't
have any locales installed.



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJT82HTAAoJEI5FoCIzSKrwGhAIAKy0t2kj5KOWM+GO6S5G7RiK
W9nFK2kFR5iD8w31H/5a+qSDWsnFh0pbxEIy47jX/5ujfmeyCRtpI+Ox+ajnu2B/
6oqnkxq/KyOYqIRRiqx3BrF4FPIoc+QiKZpmCxwfUs8QkMzGKcawz1yz3vMk0zcW
gTi3CKo8Rtemdb/KSjaJ172BpuCzrFB0v9iQ41KXy+N1cnZbtmF9xi6otJTtwdQS
bYwMA+k6YyfA041P5k2NKOEEFOL3JVG+fbWvbfFT38q7BD8BHkcOQwpgRyp1oN+3
ijh5c/MEg3eHK63chqYa5QQmuHUDfPE/8vQ5NgkAHmNYX7dh8uZrcV6KfjBp6Ao=
=uDJU
-----END PGP SIGNATURE-----




Information forwarded to bug-parted@HIDDEN:
bug#18258; Package parted. Full text available.

Message received at 18258 <at> debbugs.gnu.org:


Received: (at 18258) by debbugs.gnu.org; 13 Aug 2014 21:00:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 13 16:59:59 2014
Received: from localhost ([127.0.0.1]:42400 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XHfeJ-0000lQ-0N
	for submit <at> debbugs.gnu.org; Wed, 13 Aug 2014 16:59:59 -0400
Received: from mx1.redhat.com ([209.132.183.28]:39168)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <bcl@HIDDEN>) id 1XHfeF-0000l9-Qk
 for 18258 <at> debbugs.gnu.org; Wed, 13 Aug 2014 16:59:57 -0400
Received: from int-mx11.intmail.prod.int.phx2.redhat.com
 (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24])
 by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7DKxmnH030379
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 13 Aug 2014 16:59:49 -0400
Received: from lister.brianlane.com (ovpn-113-96.phx2.redhat.com [10.3.113.96])
 by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id
 s7DKxiMp020922
 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO);
 Wed, 13 Aug 2014 16:59:47 -0400
Date: Wed, 13 Aug 2014 13:59:44 -0700
From: "Brian C. Lane" <bcl@HIDDEN>
To: Ludovic =?iso-8859-1?Q?Court=E8s?= <ludo@HIDDEN>
Subject: Re: bug#18258: t0251-gpt-unicode.sh fails when the C.UTF-8 locale is
 unavailable
Message-ID: <20140813205944.GJ27864@HIDDEN>
References: <87vbpwbo6m.fsf@HIDDEN>
 <20140813152253.GF27864@HIDDEN>
 <87egwk5fm9.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <87egwk5fm9.fsf@HIDDEN>
User-Agent: Mutt/1.5.23 (2014-03-12)
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24
X-Spam-Score: -5.7 (-----)
X-Debbugs-Envelope-To: 18258
Cc: 18258 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.7 (-----)

On Wed, Aug 13, 2014 at 09:55:26PM +0200, Ludovic Courts wrote:
> The test could look for a valid UTF-8 locale like this:
> 
> --8<---------------cut here---------------start------------->8---
> found_locale=no
> for locale in en_US de_DE fr_FR es_ES
> do
>   LC_ALL="$locale.utf8"
> 
>   # In a UTF-8 locale, the string below prints as 4 characters.
>   if [ `printf 'foo\341\264\244' | wc -m` -eq 4 ]; then
>     found_locale=yes
>     break
>   fi
> done
> 
> if [ "$found_locale" != "yes" ]; then
>   echo "no valid UTF-8 locale found; skipping" >&2
>   exit 77
> fi
> --8<---------------cut here---------------end--------------->8---
> 
> Thoughts?

Nice! I like that better.

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)




Information forwarded to bug-parted@HIDDEN:
bug#18258; Package parted. Full text available.

Message received at 18258 <at> debbugs.gnu.org:


Received: (at 18258) by debbugs.gnu.org; 13 Aug 2014 19:55:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 13 15:55:32 2014
Received: from localhost ([127.0.0.1]:42355 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XHedv-0007Rq-Rc
	for submit <at> debbugs.gnu.org; Wed, 13 Aug 2014 15:55:32 -0400
Received: from hera.aquilenet.fr ([141.255.128.1]:35457)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <ludo@HIDDEN>) id 1XHedt-0007Rg-1D
 for 18258 <at> debbugs.gnu.org; Wed, 13 Aug 2014 15:55:30 -0400
Received: from localhost (localhost [127.0.0.1])
 by hera.aquilenet.fr (Postfix) with ESMTP id 9517F3769;
 Wed, 13 Aug 2014 21:55:27 +0200 (CEST)
Received: from hera.aquilenet.fr ([127.0.0.1])
 by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id FXEdJYbnJomH; Wed, 13 Aug 2014 21:55:27 +0200 (CEST)
Received: from pluto (reverse-83.fdn.fr [80.67.176.83])
 by hera.aquilenet.fr (Postfix) with ESMTPSA id 3B43D1247;
 Wed, 13 Aug 2014 21:55:27 +0200 (CEST)
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: "Brian C. Lane" <bcl@HIDDEN>
Subject: Re: bug#18258: t0251-gpt-unicode.sh fails when the C.UTF-8 locale is
 unavailable
References: <87vbpwbo6m.fsf@HIDDEN>
 <20140813152253.GF27864@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 26 Thermidor an 222 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0xEA52ECF4
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA  D15D 77DD 95E2 EA52 ECF4
X-OS: x86_64-unknown-linux-gnu
Date: Wed, 13 Aug 2014 21:55:26 +0200
In-Reply-To: <20140813152253.GF27864@HIDDEN> (Brian C. Lane's
 message of "Wed, 13 Aug 2014 08:22:53 -0700")
Message-ID: <87egwk5fm9.fsf@HIDDEN>
User-Agent: Gnus/5.130011 (Ma Gnus v0.11) Emacs/24.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 18258
Cc: 18258 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

"Brian C. Lane" <bcl@HIDDEN> skribis:

> See my patch here:
>
> http://lists.alioth.debian.org/pipermail/parted-devel/2014-July/004568.ht=
ml

-export LC_ALL=3DC.UTF-8
+if [ -e "/usr/share/locale/en_US/" ]; then
+    export LC_ALL=3Den_US.UTF-8
+else
+    export LC_ALL=3DC.UTF-8
+fi

The problem is that this directory is not necessarily where locale data
resides.

One way to check whether the locale encoding is supported would be
with =E2=80=98wc -m=E2=80=99:

--8<---------------cut here---------------start------------->8---
$ printf 'foo\341\264\244'|LC_ALL=3DC wc -m
6

$ printf 'foo\341\264\244'|LC_ALL=3Den_US.utf8 wc -m
4
--8<---------------cut here---------------end--------------->8---

The test could look for a valid UTF-8 locale like this:

--8<---------------cut here---------------start------------->8---
found_locale=3Dno
for locale in en_US de_DE fr_FR es_ES
do
  LC_ALL=3D"$locale.utf8"

  # In a UTF-8 locale, the string below prints as 4 characters.
  if [ `printf 'foo\341\264\244' | wc -m` -eq 4 ]; then
    found_locale=3Dyes
    break
  fi
done

if [ "$found_locale" !=3D "yes" ]; then
  echo "no valid UTF-8 locale found; skipping" >&2
  exit 77
fi
--8<---------------cut here---------------end--------------->8---

Thoughts?

Thanks,
Ludo=E2=80=99.




Information forwarded to bug-parted@HIDDEN:
bug#18258; Package parted. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 13 Aug 2014 11:54:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 13 07:54:29 2014
Received: from localhost ([127.0.0.1]:41566 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XHX8O-00021r-BH
	for submit <at> debbugs.gnu.org; Wed, 13 Aug 2014 07:54:28 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37135)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <ludo@HIDDEN>) id 1XHX8L-00021Z-K9
 for submit <at> debbugs.gnu.org; Wed, 13 Aug 2014 07:54:26 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@HIDDEN>) id 1XHX89-00033f-MK
 for submit <at> debbugs.gnu.org; Wed, 13 Aug 2014 07:54:20 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:45066)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1XHX89-00033W-KM
 for submit <at> debbugs.gnu.org; Wed, 13 Aug 2014 07:54:13 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:38805)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <ludo@HIDDEN>) id 1XHX81-0000bA-M0
 for bug-parted@HIDDEN; Wed, 13 Aug 2014 07:54:13 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@HIDDEN>) id 1XHX7s-00030y-Id
 for bug-parted@HIDDEN; Wed, 13 Aug 2014 07:54:05 -0400
Received: from hera.aquilenet.fr ([2a01:474::1]:32789)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1XHX7s-00030Y-Bb
 for bug-parted@HIDDEN; Wed, 13 Aug 2014 07:53:56 -0400
Received: from localhost (localhost [127.0.0.1])
 by hera.aquilenet.fr (Postfix) with ESMTP id B1F9F3768
 for <bug-parted@HIDDEN>; Wed, 13 Aug 2014 13:53:54 +0200 (CEST)
Received: from hera.aquilenet.fr ([127.0.0.1])
 by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id V16IMqJ50O6U for <bug-parted@HIDDEN>;
 Wed, 13 Aug 2014 13:53:54 +0200 (CEST)
Received: from pluto (reverse-83.fdn.fr [80.67.176.83])
 by hera.aquilenet.fr (Postfix) with ESMTPSA id 642A835F2
 for <bug-parted@HIDDEN>; Wed, 13 Aug 2014 13:53:54 +0200 (CEST)
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: bug-parted@HIDDEN
Subject: t0251-gpt-unicode.sh fails when the C.UTF-8 locale is unavailable
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 26 Thermidor an 222 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0xEA52ECF4
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA  D15D 77DD 95E2 EA52 ECF4
X-OS: x86_64-unknown-linux-gnu
Date: Wed, 13 Aug 2014 13:53:53 +0200
Message-ID: <87vbpwbo6m.fsf@HIDDEN>
User-Agent: Gnus/5.130011 (Ma Gnus v0.11) Emacs/24.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
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.7 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.7 (-----)

Hello,

t0251-gpt-unicode.sh requires the C.UTF-8 locale and fails if it isn=E2=80=
=99t
available.

What about:

  1. Exiting with 77 when the locale is unavailable?

  2. Choosing another locale, such as en_US.utf8?  As of GNU libc 2.19,
     C.UTF-8 (or any other spelling) does not exist.

Thanks,
Ludo=E2=80=99.




Acknowledgement sent to ludo@HIDDEN (Ludovic Courtès):
New bug report received and forwarded. Copy sent to bug-parted@HIDDEN. Full text available.
Report forwarded to bug-parted@HIDDEN:
bug#18258; Package parted. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.