Forum OpenACS Q&A: Problem with Pound Sign (£ - Can you see it)

Folks,

We have a problem with the £ (pound) sign.

If you created a simple .tcl page which had something like

set msg "This is a £"
ns_log Notice £msg

Then the pound sign appears in the log with some 'special' character
in front. This is NOT unique to ns_log and appear to be a general
AOLServer 'thingumy'...

Has anyone come across this before?

Thanks
Simon

(PS, Its wrong in this message also)

Perhaps I'm being a bit naive here, but that just looks to me like a UTF-8 character being shown in an ISO-8859-1 charset.

In a browser, it's an easy fix -- View | Character Coding | UTF-8

In a terminal window, I don't know -- I just ignore it -- it's just the log after all.

With OACS, I hack the charset. Wherever the code returns the content type, I change it to:

Content-type: text/html; charset=utf-8

In my nsd.tcl I set:

ns_section "ns/mimetypes"
ns_param   .html        "text/html; charset=utf-8"
ns_param   .tcl         "text/html; charset=utf-8"
ns_param   .adp         "text/html; charset=utf-8"

But I have been told that's wrong to do because I assume that everyone in the world has a UTF-8 compliant browser.

YMMV.