Re: [ping] [PATCH] Different outputs affected by locale

Pedro Alves
2014-06-12T18:06:03Z

On 06/12/2014 06:49 PM, Eli Zaretskii wrote:
>> Date: Thu, 12 Jun 2014 18:26:47 +0100
>> From: Pedro Alves <palves@redhat.com>
>> CC: yao@codesourcery.com, tromey@redhat.com, brobecker@adacore.com, gdb-patches@sourceware.org
>>
>>> What do you mean by "behaves as expected"? And why is LC_TYPE
>>> important here?
>>
>> I think I've answered this in my response to Yao.
>
> Not really, but you don't have to explain as long as the original
> problem is solved.

Trying again then.

The testsuite framework does, in gdb.exp:gdb_init:

# We set LC_ALL, LC_CTYPE, and LANG to C so that we get the same
# messages as expected.
setenv LC_ALL C
setenv LC_CTYPE C
setenv LANG C

... so that output is stable for everyone.

And if we do that, we miss making sure GDB works correctly
with locales/charsets other than C/ASCII on most hosts.

So I was just saying that IMO ideally we'd have tests that
make sure GDB prints what we think it should print when
LC_CTYPE (etc.) is set to something else, like e.g.,
en_US.UTF-8.

Does that answer the question?

--
Pedro Alves