Re: fconfigure -translation binary conversion

yahalom <yahalome@xxxxxxxxx> wrote:
I understand (or think I do :-)) but I am looking for a way out of
this mess. again my problem is that in tclhttpd code there is this
fconfigure. and I do not want to do in my code any utf-8 conversions
(unless this is the only way to work utf-8).

Now, *I* do not understand:
does it work *with* encoding convertto utf-8
does it work *without* encoding convertto utf-8

I'd assume that one of them would work, so where is the
problem with taking whatever works?

PS: for further diagnosis, do the following:
puts [string length $utf8Str]
(right after you got the value from DB)
If the length corresponds to the number of (hebrew)
characters, then you actually have a tcl-internal formatted
string, and you need one step of conversion: either through
encoding, or by *not* setting the channel to binary.

If the reported length is somewhat larger, then you probably
already have a utf-8 encoded string, and you can throw it
directly to a binary channel.