Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2003-03-17
21:38 • Closed ticket [703807ffff]: misleading documentation: lsearch,lsort plus 7 o... artifact: 2745154c2e user: dkf
2003-03-15
05:10 • Ticket [703807ffff]: 4 changes artifact: 284f66cbb9 user: dkf
2003-03-14
19:53 • New ticket [703807ffff]. artifact: f993ea2feb user: nobody

misleading documentation: lsearch,lsort

Closed / Fixed703807ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 24 years ago
Descriptionplain2003-03-14 19:53:10
From man lsearch:
"-ascii 
The list elements are to be examined as ASCII strings. 
This option is only meaningful when used with -exact or -
sorted. "

From man lsort:
"-ascii 
Use string comparison with ASCII collation order. This is 
the default. "

In both cases no implicit [encoding convertto ascii] 
takes place, as one might understand the 
documentation, and all Unicodes are accepted (I hope!). 

In the lsearch case, dropping the word ASCII might be 
enough.

In the lsort case, I strongly suspect that Unicode 
collation order applies. So as not to break code, the 
switch names should not be changed; but the 
documentation should tell the truth (and maybe, to 
prevent all misunderstanding, add the phrase "not 
limited to ASCII" in both cases).

[email protected]
dkfplain2003-03-15 05:10:04
Logged In: YES 
user_id=79902

Err, the point is that the '-ascii' ordering is using the
"Know-nothing character-wise ordering".  I'd hate to assert
that this is the Unicode collation ordering though; that
might be (and, knowing the Unicode consortium, probably is,
what with surrogates) slightly different...

We're really after "Stupid string programmer ordering" but I
can't call it that in documentation.  :)
dkfplain2003-03-17 21:38:19
Logged In: YES 
user_id=79902

fixed in HEAD and 8.4 branch
Log in (anonymous is fine) to add a comment.