Hi all,

If I Ns_Log() the data in a (char *) I can clearly see that it
contains newlines, and I can also verify that it contains nulls with
memchr.

I have tried any number of ways to turn it into a tcl object, eg:

            objPtr = Tcl_NewByteArrayObj(str, length);

or

            objPtr = Tcl_NewObj();
            Tcl_AppendToObj(objPtr, str, length);

or

            objPtr = Tcl_NewStringObj(str, length);

etc.

this is then set as the result object, and control returns to the tcl
code. Whether the tcl code then does an ns_log, ns_return (which I
know isn't supposed to be binary safe) or ns_write, i get all the
newlines converted into \n (ie. two characters \ then n) and chunks of
binary get converted to unicode characters.

I can see from Tcl_AppendToObj that that is supposed to happen there,
but how can I output a byte array object without it being converted to
utf8?

Any help appreciated - this is driving me nuts :)


-- 
Mark Aufflick
 contact info at http://mark.aufflick.com/about/contact


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to