Archive of UserLand's first discussion group, started October 5, 1998.

webserver.dispatch needs iso8859

Author:Dave Winer
Posted:12/16/1998; 5:57:22 PM
Topic:user.webserver discussion
Msg #:1375 (In response to 1334)
Prev/Next:1374 / 1376

From: Jeff Willden, jwillden@cc.weber.edu

system.verbs.builtins.webserver.dispatch contains a call like:

webserver.util.buildErrorPage ("500 Server Error", tryError)

but this tryError often contains server platform-specific ascii characters such as directional apostrophes and quotes. When a browser on either platform renders these in a web page, it uses strange extended ascii characters. The tryError should first be processed through string.iso8859encode or in some other way to remove platform-specific characters. Most likely the script could determine if the user-agent says it's on a Mac, the call could be:

webserver.util.buildErrorPage ("500 Server Error", string.iso8859encode (tryError, @html.data.iso8859.mac))))

and likewise for Windows. I've tried modifying this script in my copy of Frontier and it works like a charm. No more umlaut'ed capital Os and other strange characters.

Jeff Willden




This page was archived on 6/13/2001; 4:46:41 PM.

© Copyright 1998-2001 UserLand Software, Inc.