Overview
| Artifact ID: | 76b1a695d4a72ba795b8aefea6976ef04ef7d4db |
|---|---|
| Ticket: | 1908077fffffffffffffffffffffffffffffffff
string trim not trimming Unicode spaces |
| User & Date: | escargo on 2008-03-05 15:04:50 |
Changes
- assignee changed to: "nijtmans"
- cmimetype changed to: "text/plain"
- comment changed 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 changed to: "obsolete: 8.4.18"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "escargo"
- subsystem changed to: "44. UTF-8 Strings"
- title changed to: "string trim not trimming Unicode spaces"
- type changed to: "Bug"