Artifacts Associated With Ticket 539417ffffffffff
Ticket change [bf8108a37e] (rid 102262) by blacksqr on 2002-04-04 19:45:32:
- assignee initialized to: "nijtmans"
- cmimetype initialized to: "text/plain"
- comment initialized to:
The command: % scan - %c produces a different output than % scan \- %c where "-" originated as hex 96 in cp1252. Details: I have a file called longdash.txt on my Windows machine which contains a single character, hex 96, which is a long dash in the default system encoding cp1252. I read this file into a variable $longdash. I try % puts $longdash - ...as expected. Now I copy and paste the output character to get the next command: % scan - %c 8211 This is fine, tcl translated the character into its preferred encoding when the file was read. Now I try % scan \- %c 255 Huh? This behavior prevents writing of generalized functions that accept a wide range of characters, since it is desirable to escape out some characters when feeding them to the scan command. Characters with encodings higher than 255 have to be treated as a special case. A backslash should be a guarantee of safety, not a data munger. Steve Huntley [email protected]
- foundin initialized to: "obsolete: 8.3"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "blacksqr"
- subsystem initialized to: "44. UTF-8 Strings"
- title initialized to: "backslash causes scan to alter behavior"
- type initialized to: "Bug"
Ticket change [a6f450f4fa] (rid 98700) by hobbs on 2002-04-05 08:52:44:
- closedate changed to: "2002-04-05T01:52:44"
- closer changed to: "hobbs"
- icomment:
Logged In: YES user_id=72656 The noted chars don't correspond to longdash in cp1252 on my machine, but this sounds like bug 217987, which was fixed in 8.3.4 / 8.4a4.
- login: "hobbs"
- mimetype: "text/plain"
- resolution changed to: "Duplicate"
- status changed to: "Closed"
- username: "hobbs"