Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 02bc18dcc161a27bcf5e105cd6068fa6c8b00099f760d5343d50f650ac9a0354
Ticket: 8cae59ecb03a6269468379a1e028c01f604ce5de
Eliminate "-encoding binary" in favour of "-translation binary"
User & Date: cjmcdonald on 2024-06-20 13:21:27
Changes

  1. icomment:
    As the submitter of the ticket which Jan referred to, I'll comment that there was no confusion between "-encoding binary" and "-translation binary".  I'm aware of the difference, and would normally use "-translation binary" in a program, but chose to use "-encoding binary" in the ticket because I thought that it more clearly demonstrated the issue, which is that setting encoding to binary results in it showing an encoding of iso8859-1.  That is what is confusing.
    
    Using "-translation binary" doesn't make any difference, it still results in a channel encoding of iso8859-1, in Tcl 9.0b2, whereas in 8.x it showed a binary encoding.  The description which Jan linked to as "clearly documenting" the behaviour simply says that the encoding should be set to binary, preferably using "-translation binary".  It says nothing about that encoding setting being silently changed to iso8859-1.  As far as I can see that's undocumented in the man pages, and is really exposing some artefact of the internal implementation to the user.  I wasn't aware that "-encoding binary" is an alias for "-encoding iso8859-1". 
    
    I observe that one of the goals of very recent commits on Tk widgets was to keep size values specified on options unchanged, as specified by the user, rather than changing them to the internal pixel value - that was considered bad practice, and this seems to me to be a similar case.
    
  2. login: "cjmcdonald"
  3. mimetype: "text/plain"