Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b323caecf5e0ca335f3eca82db0e6f933d15696c
Ticket: 630621ffffffffffffffffffffffffffffffffff
doc that [socket] uses system encoding by default
User & Date: rmax on 2002-10-29 18:07:13
Changes

  1. assignee changed to: "andreas_kupries"
  2. cmimetype changed to: "text/plain"
  3. comment changed 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.
    
    
  4. foundin changed to: "obsolete: 8.4.1"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "rmax"
  9. subsystem changed to: "27. Channel Types"
  10. title changed to: "[socket] uses system encoding by default"
  11. type changed to: "Bug"