Page MenuHomePhabricator

Maintenance scripts break with certain multi-byte titles entered on the Windows command line
Closed, DeclinedPublic

Description

Author: uta_no_e_mail

Description:
hi I'm japanese guy.
I use
MediaWiki: 1.7.1
PHP: 5.1.4 (apache2handler)
MySQL: 5.0.24a-community-max-nt
I am not good at English and do not understand php, too.
I am glad when I understand the matter that I am going to say.
When I use Japanese (2 bytes letter? double byte?) for a file name and carry out
importtextfile.php, I do not set the item name definitely.
Thus, I do a file name in British several characters and carry out importtextfile.php and
fix title in Japanese in mysql afterwards.
However, then a search of an article is not possible


Version: 1.11.x
Severity: normal
OS: Windows 2000
Platform: PC

Details

Reference
bz8963

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:32 PM
bzimport set Reference to bz8963.
bzimport added a subscriber: Unknown Object (MLST).

This is probably due to Windows using a non-Unicode encoding for filenames and
console-app-level communications.

It may be possible to find out the locale encoding and convert, but I'm not
really sure how offhand...

Windows encoding on prompt is quite odd for supporting MS-DOS codepages, for crazyness of console programs for windows using special characters.

If using cmd (ie. no command.com Win9x/Me) you can issue the command "chcp 1252" (change to Windows-1252 codepage, default for English Windows version, set here the Japanese one) and choosing Lucida Console as the console font (right-click on the system-menu of the console window, Properties, Font Tab. Apply to current window).

This reduces the back and forth encodings so it might allow you to provide the filename in a way the scripct can use.

If you change the arcticle name directly in the db, you may need to rebuild the search index after ( maintenance/rebuildtextindex.php ).

uta: I assume Platonides' comment 2 helped. If this is still a problem in a recent version of MediaWiki and Microsoft Windows, please reopen this ticket.