[MPlayer-users] MPlayer won't open filenames with non latin characters

The Wanderer inverseparadox at comcast.net
Thu Dec 20 05:17:45 CET 2007


RVM wrote:

> El Jueves, 20 de Diciembre de 2007 03:24, The Wanderer escribió:
> 
>> RVM wrote:
>> 
>>> This happens to me on Windows XP (in Spanish), I don't know what
>>> charset Windows uses, or how the filenames are stored in the hard
>>> disc (I'm using FAT32 partitions).
>>> 
>>> I created this bat file (launch_mplayer.bat) on the desktop:
>>> 
>>> cd "C:\Documents and Settings\Ricardo\My Documents\mplayer-r25386-mingw\"
>>> mplayer.exe %1 > mplayer_log.txt 2>&1
>> 
>> I'm having a hard time imagining why this approach might be
>> necessary...
> 
> Because I couldn't pass the filename from command line (on a command
> prompt window). I can't type Japanese characters and tab
> autocompletion replaces them with ???.

And that would be the same thing you're seeing with the batch file. I
strongly suspect that the Windows command processor, or at least cmd.exe
(if that is not in fact the same thing), cannot handle extended
characters - at least not if the OS is not using a compatible charset
(or codepage, or what-have-you).

>>> VLC, for instance, can open that file without problems.
>> 
>> How are you launching VLC? By a batch file in the same way, or by
>> file-type association, or via the Open command in the GUI?
> 
> I did the same, I dragged the video to the VLC icon on the desktop.
> Anyway I'll try tomorrow using a batch file too.

If the VLC icon is a shortcut to the executable, rather than being a
batch file, that would mean not using the intermediary of the command
processor involved and would certainly explain the difference.

>>> I don't know if this problem happens under Linux too. I couldn't
>>> test it. My system is configured to ISO-8859-15 and konqueror
>>> doesn't even allow me to create such a filename.
>> 
>> That's why you should A: always run every system as UTF-8 and B: do
>> your file renaming via the command line.
> 
> Konsole doesn't allow me either. I paste the Japanese characters but
> they are replaced by ???.

Most likely, this means either that konsole does not support extended
characters or (perhaps more likely) that your system simply is not
configured for it; given that you have said your system is using
ISO-8859-15, which is the standard Western character set IIRC, that
would come as no surprise.

For what it's worth, I did my tests from a 'uxterm' (that is, a provided
wrapper around 'xterm'), on a system running with UTF-8.

>> (Admittedly switching over to UTF-8 if you are not already in it is
>> not always trivial; I did it without help, but it broke parts of my
>> system for a good long while.)
>> 
>> Under Linux, I copied a known-good file, played it with 'mplayer 
>> <filename>' to confirm still good, used 'mv' to add 日本語 to its
>> name, and played it again with the same method; it worked both
>> times. MPlayer is entirely capable of handling non-Latin characters
>> in filenames, at least under the right circumstances; it looks to
>> me like this is a problem with your environment, and probably
>> specifically with Windows batch files.
> 
> Will it able to open the file too if it is in a Windows partition?

Just tested with a Windows partition I happen to have sitting around
(this is still while running Linux, of course), and it worked just fine.

-- 
       The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.



More information about the MPlayer-users mailing list