You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_dtcl@tcl.apache.org by Wojciech Kocjan <wo...@kocjan.org> on 2001/07/24 21:14:34 UTC
Tcl_Read()
Hello.
I've been playing with i18n support int mod_dtcl (on Linux).
I set LANG to pl.iso8859-2 (for those who do not know - this sets system
encoding to iso8859-2).
Tcl_Read is similar to Tcl_ReadChars, except that it |
doesn't do encoding conversions, regardless of the chanĀ |
nel's encoding. It is deprecated and exists for backwards |
compatibility with non-internationalized Tcl extensions. |
It consumes bytes from channel and stores them in buf, |
performing end-of-line translations on the way. The |
return value of Tcl_Read is the number of bytes, up to |
toRead, written in buf. The buffer produced by Tcl_Read |
is not NULL terminated. Its contents are valid from the |
zeroth position up to and excluding the position indicated |
by the return value. |
Note the fact that it's depreciated and does not handle UTF-8 the way it
should.
This is a fact - when I changed system_encoding=Tcl_GetEncoding(...)
to Tcl_GetEncoding(interp,NULL), some Polish fonts failed.
I'd try and convert it to Tcl_ReadChars(), but I'm a bit afraid I'll
mess sth up.
David, care to make it use Tcl_ReadChars()? I'll go back to the i18n
problem again.
--
WK
Re: Tcl_Read()
Posted by "David N. Welton" <da...@apache.org>.
Wojciech Kocjan <wo...@kocjan.org> writes:
> I've been playing with i18n support int mod_dtcl (on Linux).
>
> I set LANG to pl.iso8859-2 (for those who do not know - this sets
> system encoding to iso8859-2).
...
> David, care to make it use Tcl_ReadChars()? I'll go back to the i18n
> problem again.
I've done that and committed it to CVS. Please test it out and let me
know how it works.
--
David N. Welton
Free Software: http://people.debian.org/~davidw/
Apache Tcl: http://tcl.apache.org/
Personal: http://www.efn.org/~davidw/