Re: Tcl9: source files are interpreted as utf-8 by default

Liste des GroupesRevenir à cl tcl 
Sujet : Re: Tcl9: source files are interpreted as utf-8 by default
De : rich (at) *nospam* example.invalid (Rich)
Groupes : comp.lang.tcl
Date : 10. Jan 2025, 21:13:26
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vlrv16$77q9$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14
User-Agent : tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
Luc <luc@sep.invalid> wrote:
On Fri, 10 Jan 2025 06:38:02 +0000, eric wrote:
 
The 8.6 way is wiser. 
 
Not sure... your choice of encoding may not be the one of your
application users.
In this case, your code may fail to load in the user's encoding choice.
**************************
 
The user's choice is and always will be a point of uncertainty.
 
Tcl9 introduces an additional uncertainty with the developer.

Actually, 9 /reduces/ uncertianty.

Current method:

Developer: sets his system encoding to ISO-8859.  Writes Tcl script,
and includes 8859 code points directly into the script.  everything
works for developer, on his system.

User #1: sets his system encoding to CP437 (the original DOS character
encoding -- I needed to pick 'something' other than 8859).  Downloads
"Developers" script from github, and launches it.

If Tcl interprets the script using the sysstem encoding, it will
interpret the ISO-8859 script as if it were DOS CP437 bytes.  So many
extended language letters will instead become lots of line draw
characters (just one example).  The user is disappointed, as the script
does not work "out of the box" for him.

New Tcl9 method:

All Tcl scripts are UTF-8, no exceptions (not really true, but close
enough).

Developer: Must create the script with UTF-8 encoding.  Note, the
'developer' could continue to use 8859 for 'writing' things, they
simply must use iconv (or similar) to convert to UTF-8 before feeding
the script to the Tcl interpreter.

User #1:  Continues setting his/her system encoding to CP437.  But now,
they download developer's script from github, and when they launch it
with Tcl9, it is always interpreted as UTF-8.  It "just works", and
User #1 sees the proper accented characters the developer put into the
script for prompts or other strings.  User #1 did not have to do
anything, and the script worked "out of the box" for him/her.



With the Tcl9 method of "all scripts must be UTF-8" there is less
uncertianty, because the script will be interpreted using the same
encoding everywhere, no matter what odd local system setting any given
user may have chosen.


Date Sujet#  Auteur
13 Dec 24 * Tcl9: source files are interpreted as utf-8 by default40Uwe Schmitz
13 Dec 24 +* Re: Tcl9: source files are interpreted as utf-8 by default2Harald Oehlmann
13 Dec 24 i`- Re: Tcl9: source files are interpreted as utf-8 by default1Uwe Schmitz
7 Jan 25 `* Re: Tcl9: source files are interpreted as utf-8 by default37Uwe Schmitz
7 Jan 25  +* Re: Tcl9: source files are interpreted as utf-8 by default5Harald Oehlmann
8 Jan 25  i`* Re: Tcl9: source files are interpreted as utf-8 by default4Uwe Schmitz
8 Jan 25  i `* Re: Tcl9: source files are interpreted as utf-8 by default3Harald Oehlmann
8 Jan 25  i  `* Re: Tcl9: source files are interpreted as utf-8 by default2Harald Oehlmann
8 Jan 25  i   `- Re: Tcl9: source files are interpreted as utf-8 by default1Uwe Schmitz
7 Jan 25  `* Re: Tcl9: source files are interpreted as utf-8 by default31Luc
8 Jan 25   `* Re: Tcl9: source files are interpreted as utf-8 by default30Uwe Schmitz
8 Jan 25    `* Re: Tcl9: source files are interpreted as utf-8 by default29Luc
8 Jan 25     `* Re: Tcl9: source files are interpreted as utf-8 by default28Luc
8 Jan 25      `* Re: Tcl9: source files are interpreted as utf-8 by default27Uwe Schmitz
8 Jan 25       `* Re: Tcl9: source files are interpreted as utf-8 by default26Luc
8 Jan 25        `* Re: Tcl9: source files are interpreted as utf-8 by default25Rich
8 Jan 25         `* Re: Tcl9: source files are interpreted as utf-8 by default24Luc
8 Jan 25          `* Re: Tcl9: source files are interpreted as utf-8 by default23Rich
8 Jan 25           +* Re: Tcl9: source files are interpreted as utf-8 by default12Luc
8 Jan 25           i+- Re: Tcl9: source files are interpreted as utf-8 by default1ted@loft.tnolan.com (Ted Nolan
8 Jan 25           i`* Re: Tcl9: source files are interpreted as utf-8 by default10Rich
9 Jan 25           i `* Re: Tcl9: source files are interpreted as utf-8 by default9Uwe Schmitz
9 Jan 25           i  `* Re: Tcl9: source files are interpreted as utf-8 by default8Rich
9 Jan 25           i   +* Re: Tcl9: source files are interpreted as utf-8 by default6Luc
10 Jan 25           i   i`* Re: Tcl9: source files are interpreted as utf-8 by default5Rich
10 Jan 25           i   i `* Re: Tcl9: source files are interpreted as utf-8 by default4Luc
10 Jan 25           i   i  `* Re: Tcl9: source files are interpreted as utf-8 by default3eric
10 Jan 25           i   i   `* Re: Tcl9: source files are interpreted as utf-8 by default2Luc
10 Jan 25           i   i    `- Re: Tcl9: source files are interpreted as utf-8 by default1Rich
10 Jan 25           i   `- Re: Tcl9: source files are interpreted as utf-8 by default1Uwe Schmitz
8 Jan 25           `* Re: Tcl9: source files are interpreted as utf-8 by default10saito
9 Jan 25            `* Re: Tcl9: source files are interpreted as utf-8 by default9Rich
9 Jan 25             `* Re: Tcl9: source files are interpreted as utf-8 by default8Luc
9 Jan 25              `* Re: Tcl9: source files are interpreted as utf-8 by default7Rich
9 Jan 25               `* Re: Tcl9: source files are interpreted as utf-8 by default6Luc
9 Jan 25                +* Re: Tcl9: source files are interpreted as utf-8 by default4Uwe Schmitz
9 Jan 25                i`* Re: Tcl9: source files are interpreted as utf-8 by default3Harald Oehlmann
10 Jan 25                i `* Re: Tcl9: source files are interpreted as utf-8 by default2Uwe Schmitz
10 Jan 25                i  `- Re: Tcl9: source files are interpreted as utf-8 by default1Harald Oehlmann
9 Jan 25                `- Re: Tcl9: source files are interpreted as utf-8 by default1Rich

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal