[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PATCH: redefine $decimal, $hex, $text vars

From: Jacob Bachmeyer
Subject: Re: PATCH: redefine $decimal, $hex, $text vars
Date: Thu, 13 Dec 2018 16:24:46 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20090807 MultiZilla/ SeaMonkey/1.1.17 Mnenhy/

Ben Elliston wrote:
On Thu, Dec 13, 2018 at 12:01:30AM -0600, Jacob Bachmeyer wrote:
Are we sure that DejaGnu should be sensitive to locales at all?
Perhaps the runtest shell script should always export LOCALE=C?

What if I want to test locale support in an application? I think
forcing LANG=C is rather heavy handed.

The test scripts could override it if needed. Actually, test scripts for locale support would need to force a specific locale in order to test locale support in any case. I am not suggesting repeatedly setting LANG=C, only once in the outer script, very early before any init files are read, preferably before Expect is even started. I think that it is very bad for test results to vary with locale, as could happen currently. Using the C locale by default prevents this.

If I understand correctly, the C locale is the only locale POSIX actually defines.

We could add a "testsuite locale" API call as a convenience mechanism for setting locale variables for child processes.

Lastly, if I read the Tcl documentation (particularly the re_syntax page) correctly, none of this actually matters for DejaGnu itself because Tcl does not really support locales -- Tcl has only one locale, for Unicode, and whether that means that the RE character classes refer only to ASCII or to Unicode character properties does not seem to be clearly documented.

-- Jacob

reply via email to

[Prev in Thread] Current Thread [Next in Thread]