Artifacts Associated With Ticket 630621ffffffffffffffffffffffffffffffffff
Ticket change [b323caecf5] (rid 98471) by rmax on 2002-10-29 18:07:13:
- assignee initialized to: "andreas_kupries"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Here is an excerpt from the Tcl'ers chat where this was asserted to be a bug: max: [...] imagine sockets between programs running under different locales. They will get wrong results unless using -encoding utf-8 kennykb: Is that the case? I thought that only file channels (and standard I/O) defaulted to the system encoding. rmax: tclsh8.4 [/tmp/tux]socket www.suse.de 80 sock3 tclsh8.4 [/tmp/tux]fconfigure sock3 -encoding iso8859-15 kennykb: Urk, Reinhard is right. I'm not convinced that's a feature rather than a bug. rmax: So what should be the default encoding for sockets? binary? aku: Just tried here, on windows. I get cp1252 as encoding. That is dreadful. I also believe it a bug. But what is a better default ? aku:Maybe binary ? aku:crossed kennykb: Hmmm, either binary or UTF-8. [...] NEM: Re default encoding for sockets - UTF-8 would be good, as people who want binary fconfigure binary now anyway aku: nem - true aku: default utf-8 would not impede http header decoding, it is constructed to have ASCII in it. - foundin initialized to: "obsolete: 8.4.1"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "rmax"
- subsystem initialized to: "27. Channel Types"
- title initialized to: "[socket] uses system encoding by default"
- type initialized to: "Bug"
Ticket change [99100e2c60] (rid 110721) by dkf on 2002-10-30 18:45:49:
- icomment:
Logged In: YES user_id=79902 A well-designed protocol will specify what encoding(s) to use and how to detect them; leaving it up to chance is a bad move, even if it happens to work for the test cases you're using. For example, I think HTTP is actually defined to use either ASCII or ISO8859-1 for its headers (I forget which; I know bodies are 8859-1 by default) and provides an escaping mechanism for using other encodings (this is probably all based on MIME message headers.) Given this, the fact that Tcl's default socket encoding is system-specific is no great fault, since that's one of the things you should nail down by hand. IMO, this is not a bug at all, or at least not in Tcl...
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [2c2d2609c9] (rid 118855) by davygrvy on 2002-11-28 06:17:55:
- icomment:
Logged In: YES user_id=7549 This is interesting... What if we defaulted to ISO8859-1 all around knowing that someone will fconfigure -encoding ... it later. Would an all platform setting of ISO8859-1 for a default be bad?
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Ticket change [084c159093] (rid 89539) by hobbs on 2002-11-28 06:22:36:
- icomment:
Logged In: YES user_id=72656 I would be strongly against such a potentially bug-introducing change. If anything, we should just reinforce more in the docs the known behavior that Tcl channels default to the system encoding, and leave it at that.
- login: "hobbs"
- mimetype: "text/plain"
- priority changed to: "4"
- username: "hobbs"
- icomment:
Ticket change [5b83e10fed] (rid 118339) by dkf on 2002-11-28 22:09:29:
- icomment:
Logged In: YES user_id=79902 For my money, we should just reemphasize the point in socket.n that sockets use the system encoding by default, and that anyone interacting with another machine over the internet will (probably) need to negotiate/set the encoding.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [f8847e1901] (rid 91555) by hobbs on 2002-12-01 04:05:19:
- priority changed to: "3 Low"
- title changed to: "doc that [socket] uses system encoding by default"
Ticket change [b475f8f8e8] (rid 125039) by dgp on 2003-04-14 11:14:29:
- priority changed to: "7 High"
Ticket change [91f1b61653] (rid 120700) by dkf on 2003-04-14 17:07:45:
- assignee changed to: "dkf"
- priority changed to: "9 Immediate"
Ticket change [89f381ee80] (rid 127309) by dkf on 2003-04-17 06:09:19:
- closedate changed to: "2003-04-16T23:09:19"
- closer changed to: "dkf"
- icomment:
Logged In: YES user_id=79902 Fixed (as documentation update) in HEAD and 8.4
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dkf"