Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c0d29d12127206fe81b04e66a29d1b049024c362
Ticket: 1823552fffffffffffffffffffffffffffffffff
[info hostname] encoding
User & Date: dgp on 2007-10-31 15:34:18
Changes

  1. assignee changed to: "andreas_kupries"
  2. cmimetype changed to: "text/plain"
  3. comment changed 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.
    
    
    
  4. foundin changed to: "obsolete: 8.4.16"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "dgp"
  10. subsystem changed to: "27. Channel Types"
  11. title changed to: "[info hostname] encoding"
  12. type changed to: "Bug"