Menu

#188 Impossible to set encoding for ns_sockopen

aolserver_v40
closed
5
2004-05-28
2004-04-09
No

When working with the openacs xmlrpc package I
noticed that when posting data using ns_httpopen
which calls ns_sockopen the data is encoded in
iso-8859-1 although I have set the following
parameters:

ns_section "ns/parameters"
...
ns_param HackContentType 1
ns_param URLCharset utf-8
ns_param OutputCharset utf-8
ns_param HttpOpenCharset utf-8
ns_param DefaultCharset utf-8

I would have expected and needed the posted data to
be encoded in utf-8.

Is this a bug in aolserver or am I missing some way to
manipulate the encoding?

Tested on Aolserver 4.01 on Linux.

(this was posted to the list on Thu, 29 Jan 2004 but
without replies so far)

Discussion

  • Dossy Shiobara

    Dossy Shiobara - 2004-05-28

    Logged In: YES
    user_id=21885

    I suggested this to Tilmann on the AOLSERVER mailing list:

    foreach {rfd wfd} [ns_sockopen $host $port] break
    fconfigure $wfd -encoding utf-8
    puts $wfd "some data"

    He later confirmed that this does indeed work.

     
  • Dossy Shiobara

    Dossy Shiobara - 2004-05-28
    • assigned_to: nobody --> dossy
    • status: open --> closed
     

Log in to post a comment.