Artifacts Associated With Ticket 1908077
Ticket change [76b1a695d4] (rid 105625) by escargo on 2008-03-05 15:04:50:
- assignee initialized to: "nijtmans"
- cmimetype initialized to: "text/plain"
- comment initialized to:
A string containing a leading Unicode nonbreaking space (\u00A0) did not have that character removed by [string trim ...] (no chars specified for removal). In Unicode there are several "whitespace" characters that [string trim] does not remove by default. (See http://en.wikipedia.org/wiki/Whitespace_%28computer_science%29 for a working definition of white space.) Ironically, [string is space ...] will return 1 for most of these characters, signifying that at some level these characters are known to be spaces. Interestingly, the Unicode NEL (Next Line), \u0085 gets 0 from [string is space \u0085]. So do the following two: U180E MONGOLIAN VOWEL SEPARATOR U205F MEDIUM MATHEMATICAL SPACE There are 3 issues then. [string is space ...] returns the wrong results for certain Unicode characters. [string trim ...] (the form without characters specified) is not deleting Unicode space characters. The documentation for [string trim ...] is not precise about which space characters are deleted (or not deleted). The behavior of [string trim ...] should (in my opinion) be defining as removing those characters for which [string is space .] is 1. If [string trim ...] only trims ASCII white space characters, then they should be explicitly described and listed.
- foundin initialized to: "obsolete: 8.4.18"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "escargo"
- subsystem initialized to: "44. UTF-8 Strings"
- title initialized to: "string trim not trimming Unicode spaces"
- type initialized to: "Bug"
Ticket change [f27b12aa02] (rid 109544) by nijtmans on 2012-09-21 19:14:09:
- foundin changed to: "obsolete: 8.6b3"
Ticket change [d5761235e4] (rid 123628) by dkf on 2012-09-23 09:17:29:
- icomment:
So, which Unicode character class are you thinking should satisfy the predicate? (I can't quite remember the details, but I do remember that \u0020 and \u00a0 are in different classes; the latter is I believe usually not regarded as a space even though it has a non-printing glyph...)
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [81bc6b111c] (rid 117092) by nijtmans on 2012-09-23 15:26:14:
- icomment:
> So, which Unicode character class are you thinking should satisfy the > predicate? I'm not sure yet, but most close would be unicodes "Whitespace" property. See: <http://www.unicode.org/Public/6.1.0/ucd/PropList.txt> The current "string is space" doesn't correspond to the unicode definition of "space" anyway, because CR, LF are not spaces either. "Whitespace" would be more close. Anyway, whatever change, I prefer to do that through a TIP. Adding <0085> could be done without a TIP, but <> But there are more candidates. For example, 200B was considered a space in Unicode 2.1, but not anymore now. http://www.unicode.org/Public/2.1-Update4/PropList-2.1.9.txt
- login: "nijtmans"
- mimetype: "text/plain"
- username: "nijtmans"
- icomment:
Ticket change [b2d21a7a60] (rid 98408) by nijtmans on 2012-10-19 14:22:41:
- icomment:
See: <http://www.tcl.tk/cgi-bin/tct/tip/413>
- login: "nijtmans"
- mimetype: "text/plain"
- username: "nijtmans"
- icomment:
Ticket change [52581e013c] (rid 126301) by nijtmans on 2012-11-05 21:45:38:
- closedate changed to: "2012-11-05T14:45:38"
- closer changed to: "nijtmans"
- icomment:
Fixed in (upcoming) Tcl 8.6
- login: "nijtmans"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "nijtmans"