|
2009-05-07
| ||
| 17:37 | • Closed ticket [1513659fff]: Unicode-related tests fail for non-C LANG plus 7... artifact: 0eca3796ef user: dkf | |
|
2009-03-24
| ||
| 23:14 | • Ticket [1513659fff]: 4 changes artifact: 5e3ae7dcbe user: dkf | |
|
2008-07-19
| ||
| 17:03 | • Ticket [1513659fff]: 4 changes artifact: 688d9354a0 user: dkf | |
|
2006-08-09
| ||
| 21:24 | • Ticket [1513659fff]: 4 changes artifact: 6985b02486 user: dkf | |
|
2006-07-04
| ||
| 00:25 | • Ticket [1513659fff]: 4 changes artifact: bda150c6d3 user: kot | |
|
2006-07-03
| ||
| 20:54 | • Ticket [1513659fff]: 5 changes artifact: 280ea1b3b4 user: dkf | |
| 20:20 | • Ticket [1513659fff]: 5 changes artifact: 0371be7a9d user: dgp | |
| 20:15 | • Ticket [1513659fff]: 4 changes artifact: e4a91f5a20 user: kot | |
| 15:11 | • Open ticket [1513659fff]. artifact: 565dbdc281 user: dkf | |
|
2006-07-01
| ||
| 02:15 | • Pending ticket [1513659fff]. artifact: e61f20ad97 user: dgp | |
|
2006-06-28
| ||
| 15:32 | • Ticket [1513659fff]: 1 change artifact: d644311eae user: dkf | |
| 15:32 | • Ticket [1513659fff]: 1 change artifact: 39127e9448 user: dkf | |
|
2006-06-27
| ||
| 22:43 | • New ticket [1513659fff]. artifact: 97cdd2c13d user: kot | |
Unicode-related tests fail for non-C LANG
Closed / Fixed1513659fffffffffffffffffffffffffffffffffCreated 20 years agoUpdated 18 years ago
Descriptionplain2006-06-27 22:43:54
When running tests with LANG set to uk_UA.KOI8-U, for example, some of the Unicode-using tests fail. These are in exec and env, but not only. The other annoying part, is that, when tcltest outputs the failures to the screen, it does not set stderr's encoding to -binary, so both -- the expected and the actual -- results appear as identical question marks.
dkf Ticket [1513659fff]: 1 change
[History diff]2006-06-28 15:32:30
dkf Ticket [1513659fff]: 1 change
[History diff]2006-06-28 15:32:31
dgpplain2006-07-01 02:15:26
Logged In: YES user_id=80530 Please report the names of the failing tests so the issue can be assigned to the right maintainer. Please also report what version of Tcl you see the failures in.
dkfplain2006-07-03 15:11:37
Logged In: YES user_id=79902 I think there is (independently of everything else) a tcltest issue here relating to the loss of information when tests fail without providing enough information to hunt the error. Because of this, I'm re-marking this bug as a tcltest issue. But on the other issues (test numbers, version number) I quite agree with dgp.
kotplain2006-07-03 20:15:54
Logged In: YES user_id=173641 Dgp, just set the LANG to anything (other than "C") and run the tests -- I tried the 8.4.13, but it should be reproducible with any. You'll see, and be able to enumerate the failing tests yourself.
dgpplain2006-07-03 20:20:05
Logged In: YES user_id=80530 I'd rather not work on something without a partnership with the reporter. You take it, dkf.
dkfplain2006-07-03 20:54:07
Logged In: YES user_id=79902 <sigh> I've not got a machine that has the uk_UA.KOI8-U locale installed anyway, and libc's fallback that I have got (the C locale!) works for me, but that's obviously not useful given the report. :-) As such, we *need* the submitter to cut-n-paste the entire log of what is failing inside the test suite (or inside Tcl itself) in here so that we can chase down what is going wrong. Attach it as a patch if it is too big to paste. Thanks. I'm not sure how to proceed with the stdout/stderr encoding issue, or at least not in a way that won't cause trouble elsewhere. Just configuring the output to be done in -translation binary mode is not enough, as that works by chopping high bytes from characters, and so loses information in a different way. Perhaps the right approach is to use -translation binary after an [encoding convertto utf-8]? Or maybe to provide some kind of option to turn on this behaviour, even if it is not default?
kotplain2006-07-04 00:25:05
Logged In: YES
user_id=173641
As I mentioned from the beginning, uk_UA.KOI8-U is just an
example. ru_RU.ISO8859-5 is causing similar breakage. As do
la_LN.ISO8859-4, hu_HU.ISO8859-2, while those matching
*ISO8859-1* seem to work.
==== env-4.3 setting international environment variables
FAILED
==== Contents of test case:
set env(\ua7) \ub6
getenv
---- Result was:
?=?
---- Result should have been (exact matching):
?=?
==== env-4.3 FAILED
==== env-4.4 changing international environment variables
FAILED
==== Contents of test case:
set env(\ua7) \ua7
getenv
---- Result was:
?=?
---- Result should have been (exact matching):
?=?
==== env-4.4 FAILED
==== env-4.5 unsetting international environment variables
FAILED
==== Contents of test case:
set env(\ub6) \ua7
unset env(\ua7)
set result [getenv]
unset env(\ub6)
set result
---- Result was:
?=?
---- Result should have been (exact matching):
?=?
==== env-4.5 FAILED
error.test
eval.test
event.test
exec.test
==== exec-2.6 redirecting input from immediate source, with
UTF FAILED
==== Contents of test case:
# If this fails, it may give back:
# "\uC3\uA9\uC3\uA0\uC3\uBC\uC3\uB1"
# If it does, this means that the UTF -> external
conversion did not
# occur before writing out the temp file.
exec [interpreter] $path(cat) << "\uE9\uE0\uFC\uF1"
---- Result was:
????
---- Result should have been (exact matching):
????
==== exec-2.6 FAILED
execute.test
expr-old.test
expr.test
==== expr-8.13 CompileBitAndExpr: equality expr FAILED
==== Contents of test case:
expr {"\374" eq "Э"}
---- Result was:
0
---- Result should have been (exact matching):
1
==== expr-8.13 FAILED
[...]
unixInit.test
==== unixInit-2.4 TclpInitLibraryPath: TCL_LIBRARY: INTL
FAILED
==== Contents of test case:
# Child process translates env variable from native
encoding.
set env(TCL_LIBRARY) "\xa7"
set x [lindex [getlibpath] 0]
unset env(TCL_LIBRARY)
unset env(LANG)
set x
---- Result was:
?
---- Result should have been (exact matching):
?
==== unixInit-2.4 FAILED
dkfplain2006-08-09 21:24:59
Logged In: YES user_id=79902 Perhaps the best way forward is to provide an option to tcltest which tells it to \u encode any non-ascii chars in its output? That would at least mean that if things are going wrong, you can set something so that you can figure out what's failed in a way that lets you start bug hunting... :-)
dkfplain2008-07-19 17:03:05
Logged In: YES user_id=79902 Originator: NO env.test now fixed on HEAD; it didn't need to produce non-ASCII characters to test what it was testing
dkfplain2009-03-24 23:14:17
What's the current state of this issue now that at least some of it has been fixed? I can't recheck because I'm on OSX where everything is UTF-8 anyway for all locales.
dkfplain2009-05-07 17:37:33
allow_comments - 1 Found a way to recheck and fixed the problems that remained. (There were tests with unwarranted assumptions about the system encoding...) Suggest no changes to tcltest; better to write tests to be robust and only use ASCII scripts and comparisons (possible with suitable quoting and careful test design).
Log in (anonymous is fine) to add a comment.