Artifacts Associated With Ticket 3612458fffffffffffffffffffffffffffffffff
Ticket change [f8282234e3] (rid 91492) by wrenashe on 2013-05-02 03:46:30:
- assignee initialized to: "andreas_kupries"
- cmimetype initialized to: "text/plain"
- comment initialized to:
With my built 8.5.10 I tried to issue command "fconfigure stdout -encoding utf-8" to tclsh on WinXP, the tcl prompt then was shown as two dots instead of percentage sign, C:\>tclsh85t.exe % fconfigure stdout -encoding utf-8 ‥date The current date is: 11/29/2011 Tue Enter the new date: (mm-dd-yy) time The system cannot accept the date entered. Enter the new date: (mm-dd-yy) ‥ ‥ So wonder what's wrong with fconfigure on stdout? Is that the issue? any updates on this with the new version?
- foundin initialized to: "obsolete: 8.5.10"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "wrenashe"
- subsystem initialized to: "24. Channel Commands"
- title initialized to:
"fconfigure stdout -encoding utf-8" failed on windows
- type initialized to: "Bug"
Ticket change [d21b4e1e9c] (rid 113470) by dkf on 2013-05-07 16:11:59:
- closedate changed to: "2013-05-07T09:11:59"
- closer changed to: "dkf"
- icomment:
allow_comments - 1 Tclsh on Windows is supposed to be able to talk directly to the console (as Unicode, using a Win-native API) so there should be no need to ever set the encoding on the stdout channel there, not unless it has been redirected to a file (when it should work). I'm not really surprised that bad things happen when you try this, though the particular combination is "curious" (it appears to be interpreting the two bytes of the encoding of the prompt, 0x25 followed by 0x20, as the character \u2025 - it's little-endian - which is that two-dot char). If you'd got Tcl to [puts "Hello, World!"] or something like that, you'd have seen other "interesting" chars (Chinese, I think). % encoding convertfrom unicode [encoding convertto utf-8 "% "] ‥ % encoding convertfrom unicode [encoding convertto utf-8 "Hello, World!"] 效汬Ɐ圠牯摬 The fix? Don't change -encoding when stdout is a terminal. ("Doctor! It hurts when I prod a knife in my eye!" "Well stop doing that then!") - login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Closed"
- subsystem changed to: "27. Channel Types"
- username: "dkf"