On 2007.09.05, Janine Sisk <[EMAIL PROTECTED]> wrote:
> Bas is probably right, I should just do this in pure java.  My main  
> concern is that I'm doing something wrong that's making this harder  
> than it needs to be.  Using the encoding command would be so simple...
> 
> I already saw that message, thanks, and have followed it as much as  
> possible.

If you're getting the data via ns_http and the data is coming to you as
utf8 and you need to transcode to big5, you'd need to do something like:

    # ns_http queue here ...
    ns_http wait $id data
    set output [encoding convertto big5 \
        [encoding convertfrom utf-8 $data]]

The "convertfrom utf-8" might SEEM unnecessary, but I believe ns_http
doesn't do the necessary external-to-utf conversion with its data (BAD!
or, use a Tcl_NewByteArrayObj either) ...

-- Dossy

-- 
Dossy Shiobara              | [EMAIL PROTECTED] | http://dossy.org/
Panoptic Computer Network   | http://panoptic.com/
  "He realized the fastest way to change is to laugh at your own
    folly -- then you can let go and quickly move on." (p. 70)


--
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