Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 0081456a1652405f859efd590f7e967544f5bc368895b75ce557a8c23c46b97f
Ticket: 85ddd247b637bcb25990fc55536e0ce3f9e754b2
Unable to set channel to binary encoding
User & Date: pooryorick on 2024-06-22 09:23:52
Changes

  1. icomment:
    It's important that people understand what "binary" really is in this
    text-oriented language we call Tcl.  Sugarcoating names with the term "binary"
    leads to more subtle confusion among Tcl programmers.  The documentation should
    explain that in Tcl "binary" data *is* text, and that working with binary data
    means constraining oneself to using only the first 256 Unicode characters.  If
    anything, "binary" should be removed as an encoding (but should remain for
    -translation).  That would have the benefit that people would no longer make
    the mistake of using "-encoding binary" when they meant "-translation binary",
    which is a pretty common silent-corruption-producting footgun.
    
    Programmers should take the time to read the docs and understand why iso-8859-1
    is used to read and write text that can be interpreted as "binary" data.
    
  2. login: "pooryorick"
  3. mimetype: "text/x-fossil-wiki"