Hello,
1) Why MediaWiki uses mono fonts on all the <textarea> elements related to editing? And would changing that to other font(s) cause problems? I couldn't find where to edit this in the Monobook CSS. I now it can be simply set in the textarea's style rule, but why it doesn't inherit the font of the body, which is sans-serif?
2) Is it possible to localize URLs in MediaWiki? I'm talking specifically about Arabic URLs. As far as I understand, this can only be done on the browser level not MediaWiki, however I'm seeing several refrences to encoding URLs in the code (e.g. $fallback8bitEncoding = "windows-1251"; on messages files).
Regards, Usamah
Hi Usamah,
If you use your own modification of this: #editform textarea { border: inset 1px gray; background-color: #fdfdfd; padding: 2px; font-family: sans-serif; font-size: 110%; line-height: 1.5em; } In your monobook.css then you can change the text in the editform to whatever you want. It doesn't cause any problems that I've found and my users say it is much easier to read. Good luck on the why and your other question.
-----Original Message-----
1) Why MediaWiki uses mono fonts on all the <textarea> elements related to editing? And would changing that to other font(s) cause problems? I couldn't find where to edit this in the Monobook CSS. I now it can be simply set in the textarea's style rule, but why it doesn't inherit the font of the body, which is sans-serif?
_______________________________________________
Thank you, Christensen.
I already know how to chnage the form fonts in CSS, but I was confused why it doesn't change when declaring another font for the body selector in monobook.css as it's the only font name declaration (other than on the <q> element selector). I didn't know that browsers define different fonts for HTML forms as explained by Brion. :)
On Wed, Feb 27, 2008 at 4:55 PM, Christensen, Courtney ChristensenC@battelle.org wrote:
Hi Usamah,
If you use your own modification of this: #editform textarea { border: inset 1px gray; background-color: #fdfdfd; padding: 2px; font-family: sans-serif; font-size: 110%; line-height: 1.5em; } In your monobook.css then you can change the text in the editform to whatever you want. It doesn't cause any problems that I've found and my users say it is much easier to read. Good luck on the why and your other question.
-----Original Message-----
- Why MediaWiki uses mono fonts on all the <textarea> elements
related to editing? And would changing that to other font(s) cause problems? I couldn't find where to edit this in the Monobook CSS. I now it can be simply set in the textarea's style rule, but why it doesn't inherit the font of the body, which is sans-serif?
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Usamah M. Ali wrote:
Hello,
- Why MediaWiki uses mono fonts on all the <textarea> elements
related to editing?
It doesn't -- that's the default of your browser. (Unless your browser is Safari, in which case it defaults to a Sans Serif font.)
And would changing that to other font(s) cause problems?
It makes ASCII art harder to edit; otherwise, no problems. :)
The other reply to your message describes how to tweak the CSS.
- Is it possible to localize URLs in MediaWiki? I'm talking
specifically about Arabic URLs. As far as I understand, this can only be done on the browser level not MediaWiki, however I'm seeing several refrences to encoding URLs in the code (e.g. $fallback8bitEncoding = "windows-1251"; on messages files).
MediaWiki uses Unicode UTF-8 encoding for all input/output, including URL formatting. The UTF-8 bytes in the URLs are then encoded per spec (that is, as URI-compatible IRIs).
In many cases you can still link to your wiki from outside using a non-Unicode encoding... "incoming" URLs which are detected as not being valid UTF-8 are assumed to be in a language-specific encoding (defined in the language file; for Arabic this will be windows-1256).
Conversion is then applied to get the data into Unicode -- but this will probably only work properly for non-Western encodings when PHP's iconv extension is available.
-- brion vibber (brion @ wikimedia.org)
On Wed, Feb 27, 2008 at 9:42 PM, Brion Vibber brion@wikimedia.org wrote:
It doesn't -- that's the default of your browser. (Unless your browser is Safari, in which case it defaults to a Sans Serif font.)
Thanks. That was the source of my confusion.
MediaWiki uses Unicode UTF-8 encoding for all input/output, including URL formatting. The UTF-8 bytes in the URLs are then encoded per spec (that is, as URI-compatible IRIs).
In many cases you can still link to your wiki from outside using a non-Unicode encoding... "incoming" URLs which are detected as not being valid UTF-8 are assumed to be in a language-specific encoding (defined in the language file; for Arabic this will be windows-1256).
Conversion is then applied to get the data into Unicode -- but this will probably only work properly for non-Western encodings when PHP's iconv extension is available.
Thanks Brion.
I'm trying hard to implement IRIs support for my wiki site, which is still under development. The percent-espace part of a non-UTF8 encoded URI is really really unfriendly. The browsers support for IRIs varies considerable albeit all them (except IE6 which needs an add-on for that) are claiming built-in IRIs/IDNs support (I don't care about IDNs for now). The best being Opera which displays IRIs just perfectly (you can check it on the Arabic Wikipedia). IE7 also has built-in IRIs support but it doesn't work no matter what I've done. I have the right settings in Tools -> Internet Options -> Advanced: Send UTF-8 URLs, but still it doesn't work!
Firefox support it by setting the value of "network.standard-url.encode-utf8" in about:config to true (default is false), but yet again it doesn't work!
WikiMedia URLs are not just paths to files or articles; actually one can learn many things about MediaWiki's structure and architecure by looking at a URL, and that's why I'm persistant in getting them to work.
I've done all these tests on a latest version 1.11.1 MediaWiki installed on a localhost dev server, and iconv is installed ane enabled. I'm clueless as to what should I do.
Usamah M. Ali wrote:
I'm trying hard to implement IRIs support for my wiki site, which is still under development. The percent-espace part of a non-UTF8 encoded URI is really really unfriendly. The browsers support for IRIs varies considerable albeit all them (except IE6 which needs an add-on for that) are claiming built-in IRIs/IDNs support (I don't care about IDNs for now). The best being Opera which displays IRIs just perfectly (you can check it on the Arabic Wikipedia). IE7 also has built-in IRIs support but it doesn't work no matter what I've done. I have the right settings in Tools -> Internet Options -> Advanced: Send UTF-8 URLs, but still it doesn't work!
Firefox support it by setting the value of "network.standard-url.encode-utf8" in about:config to true (default is false), but yet again it doesn't work!
WikiMedia URLs are not just paths to files or articles; actually one can learn many things about MediaWiki's structure and architecure by looking at a URL, and that's why I'm persistant in getting them to work.
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)
Brion Vibber wrote:
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.
It has been in Firefox 3
On Thu, Feb 28, 2008 at 12:00 AM, Brion Vibber brion@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
Usamah M. Ali wrote:
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.
Yeah, it's called don't-escape-those-other-bytes or unescape-the-ones-you-want.
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.
We use URI-encoded IRIs exclusively. This is compatible with all known browsers and HTTP. Which is... good? :)
-- brion vibber (brion @ wikimedia.org)
mediawiki-l@lists.wikimedia.org