3 ms·
Setting the charset on each page is necessary but not sufficient. My guess: you also need to tell the browser to send form data as utf8. Perhaps by specifyin
by abstractbill 19y ago
Setting the charset on each page is necessary but not sufficient.
My guess: you also need to tell the browser to send form data as utf8. Perhaps by specifying "accept-charset" as UTF-8 in each form tag.
- euccastro 19y agoIf that works it would be better than guessing. :) Since you are sanitizing the input string, I still recommed translating to native mzScheme/Arc unicode, doing the transformations in that format, then retranslating back to utf-8 for display. The call to get a canonical string from utf-8 is: (bytes->string/utf-8 input-txt)
- euccastro 19y agoAnd if I may abuse this thread to add one request, please store the raw string as you got it from the browser, and do the processing before displaying it (unless you determine that would be a security risk or a performance killer). If I use ampersand tags or other formatting to write a comment, they are lost when I edit it. It's kinda irritating to lose the indentation of a code sample (lots of s) when editing out a mistake. :)