Am Friday, 20. June 2003 16:21, schrieb Matt Sergeant: > I think we should be wrapping all usage of Apache::Request in a utf-8 > compatible wrapper like the one listed here: > http://use.perl.org/comments.pl?sid=13547&op=&threshold=0&commentsort=1&mod >e=thread&tid=34&pid=21057#21061 > > http://xrl.us/jxv if that wraps.
The list of browsers not doing UTF-8 urlencoding is longer: most prominently there are older IE versions, also recent IEs with "use UTF8 URLs" turned off (somewhere in the advanced settings). Netscape 4 is of course equally disabled, as are other older/less popular browsers. To solve this, see AxKit::ToUTF8. AxExternalEncoding already does smart URI translation into UTF-8 for compatibility - if an URI parses as UTF-8 it is left unmodified, if not it is translated from $ExternalEncoding into UTF-8 (not marked UTF8 though, because this is apache space, not perl). AxKit::ToUTF8 does the same thing for anyone (including marking the result UTF-8 in any case), I use it in the directory provider and ESQL for now. I think we should wrap Apache::Request with AxKit::ToUTF8 so we get reasonable compatibility. The auto-detect mechanism is not fail safe - a valid ISO-8859-1 string can parse as UTF-8, but this is extremely rare if we talk about human language words. If an URL is UTF-8, on the other hand, it will always be recognized as such. -- CU Joerg