[Mediawiki-l] Few questions

Usamah M. Ali usamah1228 at gmail.com
Thu Feb 28 02:26:50 UTC 2008


On Thu, Feb 28, 2008 at 12:00 AM, Brion Vibber <brion at wikimedia.org> wrote:
> Well, it sounds like what you're trying to do is to have the URLs
> displayed in the browser without the percent encoding.
>
> Some browsers will strip out the percents on UTF-8 URLs when they
> display them (say, Safari), while some don't (say, Firefox). There's a
> longstanding bug entry for Firefox to do this, not yet firmly addressed.
>
> Some will only show the pretty Unicode characters if you don't encode
> the URLs you generate yourself... others will re-encode them for you
> even if you pass an unencoded IRI.
>
> You might try messing about with the wfUrlencode() function a bit in
> GlobalSettings.php. Be sure not to break the encoding of characters
> which *must* be encoded!
>
>
> -- brion vibber (brion @ wikimedia.org)
>

Opera is the only current browser that support IRIs the right way by
default. While Safari (for Windows) seems to support it right too and
by default, it has rather a funny show-stopper bug in rendering Arabic
scripts that deemed it certainly useless to Arabic users.

The function you've suggested looking at is really nothing more than
PHP's urlencode() with 2 regular expressions matching for including
':' and '/' as characters. I think there's a need to write a converter
function that converts a URL string in percent-escape format to a
UTF-8 one. I'll see what I can do and respond back later on.

Although I'm quite impressed with the level of emphasis on
internationalization in MediaWiki, I'm a bit disappointed that IRIs,
which is now supported by almost all modern browsers, cannot be used
in MW.

Regards,
Usamah



More information about the MediaWiki-l mailing list