[plt-scheme] Questions about Web Server usage
On 5/29/07, YC <yinso.chen at gmail.com> wrote:
>
> Do you mean that both the key & the value would be replaced with bytes
> instead of strings?
Yes.
> IMHO for files it makes sense to use bytes as the value because often we
> just want the file raw rather than processing it. But for form bindings it
> seems string is more useful as it's easier to convert to other types, so to
> me this doesn't seem to be a better solution.
I agree that strings are more useful.
> Also - if non utf-8 bytes are difficult to translate to utf-8 at web server
> level then it's probably also not trivial to do so at servlet level. Are
> there good mechanisms to handle code page translations in mzscheme?
It's not that difficult: bytes->string/utf-8 and family.
The main problem is that if this is going to fail, I don't want to be
the one blaimed for it. The server has no reason to look at these
values, so it irks me that it crashes by them. Furthermore, by moving
the error in the servlet code, it can be caught more effectively and
displayed to the user in an appropriate context.
Jay
--
Jay McCarthy <jay.mccarthy at gmail.com>
http://jay.teammccarthy.org