|
From: Anton K. <a_k...@fr...> - 2003-05-24 12:57:46
|
>>>>> Kevin Kenny writes:
> I think we're all in substantial agreement:
Yes. And I've just submitted a patch #742683 to the Tcl project,
implementing both [source -encoding] and [tclsh -encoding].
I haven't yet touched pkgIndex.tcl and the like (e.g. sourcing
init.tcl), but with this new option it's really easy.
> - source should take a -encoding parameter (and let's add --
> to mark the end of parameters, shall we, for consistency?)
I think we shouldn't. [source] with just one argument {-encoding}
will take -encoding as a file name, not an option, 'cause fileName
is a mandatory argument. The common tcl practice is NOT TO ADD {--}
in such cases (see puts -nonewline)
> - tclsh/wish should take a -encoding option for the
> initial file.
wish should be modified. I'll do it if patch #742683 is
accepted.
> - init.tcl, library.tcl, etc. should be source'd
> definitively in UTF-8 or Latin-1 - which can be
> specified in the tclIndex and pkgIndex.tcl files -
> which in turn should ALWAYS be UTF-8!
This is not yet addressed with the patch.
> - ~/.tclshrc, ~/.wishrc, and the option database should
> be loaded in system encoding.
..as they are now. No changes here.
> - an extended variant of Tcl_EvalFile should be
> provided for specifying encoding from the C level.
I call it Tcl_EvalFileEx.
--
With Best /usr/bin/wishes,
Anton Kovalenko /* http://kovalenko.webzone.ru */
|