Artifacts Associated With Ticket 1823552
Ticket change [c0d29d1212] (rid 102481) by dgp on 2007-10-31 15:34:18:
- assignee initialized to: "andreas_kupries"
- cmimetype initialized to: "text/plain"
- comment initialized to:
In an application that embeds Tcl, we create data snapshot files, and construct unique filenames to avoid collision when filesystems are shared by several systems running our app, like so: set name foo-[info hostname]-[pid] Some users of our app working on a Chinese Windows system report errors about not being able to find/read these files. After a few rounds of debugging, the problem realtes to their [info hostname] containing Chinese characters. If we revise to set name foo-[encoding convertfrom [info hostname]]-[pid] then the app works again. Looking at the source code fro Tcl_GetHostname() it appears that the translation from system encoding to internal encoding is not done on Windows when the value is retreived from a gethostname() routine. It seems this bug has been undetected for a long time, since it is only very recently that ICANN is permitting domain names to have non-ASCII characters.
- foundin initialized to: "obsolete: 8.4.16"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "27. Channel Types"
- title initialized to: "[info hostname] encoding"
- type initialized to: "Bug"
Ticket change [e6f96c2e24] (rid 104378) by davygrvy on 2007-11-16 01:18:11:
- icomment:
Logged In: YES user_id=7549 Originator: NO Andreas, It appears you fixed this.
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Ticket change [4149fec8d6] (rid 116163) by andreas_kupries on 2007-11-16 01:24:21:
- icomment:
Logged In: YES user_id=75003 Originator: NO When ? I do not remember having worked in this area.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [61b20c85eb] (rid 92284) by dgp on 2007-11-16 01:31:15:
- icomment:
Logged In: YES user_id=80530 Originator: YES Please note the bug is filed against 8.4.16. The bug is technically present on both branches, but due to other changes, it is practically never encountered on the 8.5 branch. I have a patch in my head to put on the HEAD; just haven't got back to it yet.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [c55c5c25cb] (rid 111991) by davygrvy on 2007-11-16 01:48:30:
- icomment:
Logged In: YES user_id=7549 Originator: NO tclWinSock.c:InitializeHostName() on the HEAD looks like it has the correct behavior reading through it.
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Ticket change [cc67adfe50] (rid 95691) by dgp on 2007-11-16 03:06:53:
- icomment:
Logged In: YES user_id=80530 Originator: YES The branch that calls getComputerNameProc() is correct. Since that will presumable always succeed, the HEAD code won't reach the bug. The followup branch that calls gethostname() is the part that is broken. gethostname() empirically returns a string in the [encoding system], but the InitializeHostName() routine assumes the string is in utf-8. On the 8.4 branch, the gethostname() attempt comes before the getComputerNameProc() attempt, so the bug is easier to demo and more important to fix.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [2906a5cfa1] (rid 88803) by dgp on 2007-11-28 01:47:41:
- assignee changed to: "dgp"
- priority changed to: "9 Immediate"
Ticket change [7b39c9689a] (rid 90486) by dgp on 2007-11-28 03:27:27:
- icomment:
File Added - 256332: 1823552.patch Logged In: YES user_id=80530 Originator: YES Here's a patch for 8.4 File Added: 1823552.patch
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Add attachment "1823552.patch" [9e107de62d] (rid 96413) by dgp on 2007-11-28 03:27:27.
Ticket change [eb44f4d7aa] (rid 103520) by dgp on 2007-11-28 03:30:56:
- icomment:
Logged In: YES user_id=80530 Originator: YES committed for 8.4.17
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [99922aab1c] (rid 110817) by dgp on 2007-11-28 03:39:27:
- closedate changed to: "2007-11-27T20:39:27"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 Originator: YES Issue patched for 8.5.0 as well, though it likely never triggers there.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dgp"