> Extended ASCII characters in Tcl variables (e.g. headings and labels), for > example � (eacute, \xE9) are rendered in HTML pages and in server.log as > é, \xC3 \xA9, � as è \xC3 \xA8, etc. Same "leadin" A-tilde for all the
They are being output directly as utf-8 chars, which is what Tcl uses internally to store non-ascii data. For example: (tkcon) 49 % encoding convertto utf-8 \xe9 é > different Tcl programs written at different times. Only happens with > ns_return, does not happen when text is written to a file (puts). The > second character is the correct one, minus 64-decimal. ns_return might not be handling the data right, or the receiving function isn't understanding it correctly. The puts works because automatic file encoding is at work. > A workaround is to regsub the extended characters to HTML character > entities (é etc.) just before ns_return 200 text/html $rslt My guess is that whatever finally outputs (to stdout?) isn't doing the conversion correctly. Perhaps 'fconfigure stdout' will show something not correct? Jeff Hobbs The Tcl Guy Senior Developer http://www.ActiveState.com/ Tcl Support and Productivity Solutions
