Fredrik Lundh" <email@example.com
Wed, 17 May 2000 16:29:32 +0200
Fred L. Drake wrote:
> On Wed, 17 May 2000, Fredrik Lundh wrote:
> > the main reason for that is that Python 1.6 doesn't have any way to
> > specify source encodings. add that, so you no longer have to guess
> > what a string *literal* really is, and that problem goes away. but
> You seem to be familiar with the Tcl work, so I'll ask you
> this question: Does Tcl have a way to specify source encoding?
Tcl has a system encoding (which is used when passing strings
through system APIs), and file/channel-specific encodings.
(for info on how they initialize the system encoding, see earlier
unfortunately, they're using the system encoding also for source
code. for portable code, they recommend sticking to ASCII or
using "bootstrap scripts", e.g:
set fd [open "app.tcl" r]
fconfigure $fd -encoding euc-jp
set jpscript [read $fd]
we can surely do better in 1.7...