Hello mediawiki-l,
I have my own wiki http://towiki.ru/ powered by MediaWiki, it's a CityWiki for Tomsk. It works fine in IE and Opera, but I have one problem in Firefox:
if I try to open URL (codepage in Windows is Russian: Windows-1251): http://towiki.ru/view/%D0%90%D1%81%D0%B8%D0%BD%D0%BE
FireFox tries to retrieve incorrect URL: http://towiki.ru/view/%C3%80%C3%B1%C3%A8%C3%AD%C3%AE
but correct URL is: http://towiki.ru/view/%D0%90%D1%81%D0%B8%D0%BD%D0%BE
It is because FireFox setting network.standard-url.encode-utf8 by default is set to false, see http://kb.mozillazine.org/Network.standard-url.encode-utf8
If I change in about:config network.standard-url.encode-utf8 to true, FireFox also works, but it is not a solution because everybody have this parameter switched to false.
BUT in ru-Wikipedia http://ru.wikipedia.org/wiki/%D0%90%D1%81%D0%B8%D0%BD%D0%BE even with network.standard-url.encode-utf8=false gives http://ru.wikipedia.org/wiki/%D0%90%D1%81%D0%B8%D0%BD%D0%BE so all works correct.
My question is - why it works correct in Wikipedia and how I can do the same for my wiki?
Thank you very much for your help!
Maxim a écrit :
if I try to open URL (codepage in Windows is Russian: Windows-1251): http://towiki.ru/view/%D0%90%D1%81%D0%B8%D0%BD%D0%BE
FireFox tries to retrieve incorrect URL: http://towiki.ru/view/%C3%80%C3%B1%C3%A8%C3%AD%C3%AE
but correct URL is: http://towiki.ru/view/%D0%90%D1%81%D0%B8%D0%BD%D0%BE
It is because FireFox setting network.standard-url.encode-utf8 by default is set to false, see http://kb.mozillazine.org/Network.standard-url.encode-utf8
My Firefox 2.0 (with network.standard-url.encode-utf8 set to false) opens the good one (click on http://towiki.ru/view/%D0%90%D1%81%D0%B8%D0%BD%D0%BE opens url : http://towiki.ru/view/%D0%90%D1%81%D0%B8%D0%BD%D0%BE).
Did you change something ?
Hello Alexis,
Thank you for your answer. But I still have the problem on my side. I guees you have non-Russian default locale. If I switch Default locale = English (United States) then it also works fine, but in Russia all users have Default locale = Russian, that's a problem.
In ru.wikipedia.org all works fine, but on my site it does not :(
May be there are some special web-server settings on Wikipedia sites?
Thursday, March 29, 2007, 3:42:23 PM, you wrote:
AM> Maxim a ecrit :
if I try to open URL (codepage in Windows is Russian: Windows-1251): http://towiki.ru/view/%D0%90%D1%81%D0%B8%D0%BD%D0%BE
FireFox tries to retrieve incorrect URL: http://towiki.ru/view/%C3%80%C3%B1%C3%A8%C3%AD%C3%AE
but correct URL is: http://towiki.ru/view/%D0%90%D1%81%D0%B8%D0%BD%D0%BE
It is because FireFox setting network.standard-url.encode-utf8 by default is set to false, see http://kb.mozillazine.org/Network.standard-url.encode-utf8
AM> My Firefox 2.0 (with network.standard-url.encode-utf8 set to AM> false) opens the good one (click on http://towiki.ru/view/%D0%90%D1%81%D0%B8%D0%BD%D0%BE AM> opens url : http://towiki.ru/view/%D0%90%D1%81%D0%B8%D0%BD%D0%BE).
AM> Did you change something ?
AM> _______________________________________________ AM> MediaWiki-l mailing list AM> MediaWiki-l@lists.wikimedia.org AM> http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Maxim wrote:
I have my own wiki http://towiki.ru/ powered by MediaWiki, it's a CityWiki for Tomsk. It works fine in IE and Opera, but I have one problem in Firefox:
if I try to open URL (codepage in Windows is Russian: Windows-1251): http://towiki.ru/view/%D0%90%D1%81%D0%B8%D0%BD%D0%BE
FireFox tries to retrieve incorrect URL: http://towiki.ru/view/%C3%80%C3%B1%C3%A8%C3%AD%C3%AE
but correct URL is: http://towiki.ru/view/%D0%90%D1%81%D0%B8%D0%BD%D0%BE
In order to convert incoming URLs that aren't UTF-8, MediaWiki needs to do two things:
First, it needs to know what encoding to convert from. This is a guess of most likely non-UTF-8 encoding based on the set up content language; for Russian I believe we try Windows-1251.
Second, it needs to actually be able to do the conversion from that to UTF-8. Conversions are done using iconv() if it's available as a PHP module (not enabled by default).
But... if this module is not present, then the only conversion available is utf8_encode() which converts only from ISO 8859-1 (Latin-1). This I believe will produce the results you describe.
See if you can enable the iconv module for PHP; that should be able to fix the conversion (double-check for cached redirects after making the change).
Alternatively it may be possible to rig up a fallback conversion function using a hardcoded table, or maybe mb_convert_encoding if that's also available.
- -- brion vibber (brion @ wikimedia.org)
Hello Brion,
Thursday, March 29, 2007, 10:11:24 PM, you wrote:
BV> See if you can enable the iconv module for PHP; that should be able to BV> fix the conversion (double-check for cached redirects after making the BV> change).
It works, thank you very much!
mediawiki-l@lists.wikimedia.org