Hi all,

We have an existing Tcl service which provides the data from mysql to clients as an HTML table. We have some records in mysql with multibye characters which are not being rendered correctly.

Simple ns_db getrow does not return me the correctly encoded data form database.
I have the sample code snippet to replicate this

        set db [ns_db gethandle]

        set sql1 "use mydb";
        ns_db exec $db $sql1;
set row [ns_db select $db "select title from channel"]
        set numcols [ns_set size $row]
while {[ns_db getrow $db $row]} {
           for {set i 0} {$i < $numcols} {incr i} {
              ns_puts " :[ns_set value $row $i]"
          }
ns_puts "<br>" }

I understand that I need to specify the encoding to get the correct tcl strings in ns_set but cannot find the way to do so. Any pointers?

Thanks in advance--
-- Rajesh Nair


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