Tk Library Source Code

View Ticket
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.
Ticket UUID: 509776
Title: Locale dependant test failures
Type: Bug Version: None
Submitter: kot Created on: 2002-01-28 19:40:51
Subsystem: None Assigned To: patthoyts
Priority: 6 Severity:
Status: Open Last Modified: 2004-09-30 01:52:37
Resolution: Accepted Closed By:
    Closed on:
Several test scripts asume ::argv0 to always be there,
which is not the case for a slave interpreter. The
tests run fine by themselves but fail from under the
all.tcl harness... This one-line patch addresses the


P.S. Some other tests (mime decode/encode) fail because
they assume the C/iso-8859-1 locale. To pass they must
run with LANG=C set...
User Comments: andreas_kupries added on 2004-09-30 01:52:37:
Logged In: YES 

Has the discussion closed ? As the patch has been applied,
can the entry be closed as well ? What issues are open and
unresolved ?

patthoyts added on 2003-04-28 16:43:26:
Logged In: YES 

Moved this from patches to bugs as the patch has been
applied and this is now a bug discussion.

patthoyts added on 2003-04-28 16:40:21:
Logged In: YES 

Renaming this - we now use 'sak.tcl' to run the test suite -
but I'm certain the same problems will be present. Need to
retry with
 tclsh sak.tcl test

kot added on 2003-04-24 23:46:51:
Logged In: YES 

FIY. My LANG is set to uk_UA.KOI8-U. I observed failures 
on FreeBSD. The FreeBSD port now sets LANG to C prior 
to running tests (or anything), which provides the 

patthoyts added on 2003-03-29 09:16:41:
Logged In: YES 

This certainly seems like a reasonable patch. It appears
that none of the current tests depend upon argv0 now but
this would prevent future problems.

I don't know about the locale issue though. I've tried
running the mime tests with LANG set to fr, de and C but it
has passed every time.

I've committed this patch as it doesn't cause any new failures.

Need to confirm the locale issue either on a unix system or
have someone who natively uses a non-english locale to check
for any such depencency.

andreas_kupries added on 2003-03-29 00:49:19:
Logged In: YES 

True regarding duplication.

However this patch seems to be more general than the patch 
in #507242. Application stops future problems with argv0 

What's your opinion ?

patthoyts added on 2002-01-29 23:05:47:
Logged In: YES 

Duplicate of bug #507242 except for the locale issue.

Hmm. How do we ensure the C locale from within Tcl during a 

kot added on 2002-01-29 02:42:24:
Logged In: YES 

SourceForge wouldn't let me attach the file. Here it is
(watch out for spaces vs. tabs):

--- all.tcl     Mon Jan 21 12:55:22 2002
+++ all.tcl     Mon Jan 28 14:30:41 2002
@@ -122,4 +122,5 @@
     # import the auto_path from the parent interp, so
"package require" works
     $c eval {
+       set ::argv0 [pSet ::argv0]
        set ::tcllibModule [pSet module]
        set auto_path [pSet auto_path]