Deutsch   English   Français   Italiano  
<103btkq$1bs7q$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Rich <rich@example.invalid>
Newsgroups: comp.lang.tcl
Subject: Re: Tcl 8.6 vs 9.0 encoding plus some general confusion
Date: Mon, 23 Jun 2025 15:59:22 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <103btkq$1bs7q$1@dont-email.me>
References: <mbr60nF6lf9U1@mid.individual.net> <ygaqzzaai1z.fsf@akutech.de>
Injection-Date: Mon, 23 Jun 2025 17:59:24 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="7d77c121bd1e30a9de00e468228a4a78";
	logging-data="1437946"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/FqkMpH5dNVjHi/V+soGk2"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
Cancel-Lock: sha1:k2NNRYxfZzcTbncMzc6djT8YtkI=

Ralf Fassel <ralfixx@gmx.de> wrote:
> > and I don't understand this at all.  If I say "-encoding 
> > iso8859-1", am I not saying that the data is textual, and that Tcl 
> > should parse it from "iso8859-1" into the internal Unicode as it 
> > reads it?
> 
> Looking at the TCL sources for 9.0 and 8.6, it seems that the 
> 'binary' encoding always has been an alias for 'iso8859-1', which has 
> finally been removed in TCL 9, cf.  changes.md:
> 
>     ## Notable incompatibilities
>      - Removed the encoding alias `binary` to `iso8859-1`.

This feels like unnecesary exposure of internal details that an end 
user is not concerned about.

A user wants to read "binary" data, it would seem that they would 
expect to use "binary" as the name for that "encoding" (well, really, a 
lack of any encoding).  If it indeed was mapped to iso8859-1 
internally, that is an internal implemntation detail that is of no 
concern to them.  Instead, I expect we will start to see a lot of 
confusion from user's wondering why they are setting a "character 
encoding" when they really wanted to read "binary" data.

> Effectively nothing should have changed, except you can no longer
> say
>    chan -encoding binary
> in tcl 9 (should have used "-translation binary" anyway).

Keeping the external "binary" alias visible would have been the better 
option in my opinion.  Even if it was nothing more than an alias for 
iso8859-1.