Re: 1 cset was pushed to core/extraget:xarMod.php:First stab at modifyin xarM...
"Jason Judge" <[email protected]>
| Newsgroups | gmane.comp.cms.xaraya.bk-notices |
|---|---|
| Organization | Xaraya |
| Message-ID | <[email protected]> |
It's actually not that difficult. All characters >127 get encoded. Period. That will involve all special unicode characters, since all multi-byte characters have a value>127. Below 127, the rules are pretty fixed - basically encode certain ranges of characters. Whether this method turns out to be faster/more flexible/better, I don't know, but I'l try and investigate it. PHP's rawurlencode just encodes too much, making many URLs unreadable, and it does not take into account the fact that some characters only need to be encoded in certain places in the URL, and not others. -- JJ "Michael Cortez" <mcortez-8sipqmjc3J32fBVCVOL8/[email protected]> wrote in message news:mailman.248.1109725818.7539.xaraya_bk-notices-gn8pmO+6nsymdvSpIQae8A@public.gmane.org >> html/includes/xarMod.php >> 1.306 05/03/02 00:35:41 [email protected] +93 -90 >> First stab at modifyin xarMod.php >> I'm sure there is some array trickery we can use to >> make this a little more efficient. >> >From the code: + // TODO: tackle it the other way around, i.e. have rules for + // what to encode, rather than undoing some ecoded characters. I would not recommend doing this. Unless you really, really, want to go through and add special rules for encoding the vast majority of unicode. Remember, it doesn't just encode the various illegal punctuation, but it also encodes the non US-ANSI characters that could end up in a URL as well (think Titles as URLs on international sites.) -- Mike C.