Forum OpenACS Development: Re: User Smart Search Widget with Ajax
Your widget is just fantastic. Thank you very much for the code. I have just one question: I'm having encoding problems in the search results. Any idea on how to fix it?
I'm happy to hear my widget was helpful to you. What kind of encoding problems are you having? What do your search results look like?
Do you have any ideas on how to fix it?
My understanding of character encoding is a bit hazy, but this (old) thread might help:
ns_write [encoding convertto utf-8 $response]
I'm forcing the encoding to be utf-8. It seems to me like ns_write is ignoring the server's encoding (possibly an AOLServer bug). In your standard exit:
the HTML response to the browser gets the wrong encoding, but the ns_log command, for example, has the right server encoding. It's an workaround but it's working.