Author: donpaolo
Description:
I'm using mediawiki on a Windows Server 2003.
When I upload a file and I tell mediawiki to store it with a file name with special characters (i.e. accented characters, like à, é, or ñ, etc.), the file is stored in a wrong way: à -> A with a ~ + ï (i think).
It seems a utf-8 to iso-8859-1 (or the contrary) stuff.
I think it's because ntfs stores file names with iso-8859-1 charset, so that when mediawiki passes the file name in utf-8 charset, ntfs interprets it as a iso-8859-1 string.
Experimenting on my own with uploading and saving a file from php page, I found a solution:
In the case that the upload ends with the instruction
copy ( $tempfile , $filename ) ;
you should change it into
copy ( $tempfile , utf8_decode ( $filename ) ) ;
That seems to eliminate the problem on Windows Server 2003.
Version: 1.13.x
Severity: normal
OS: Windows Server 2003
Platform: PC