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

Rich Felker dalias at aerifal.cx
Tue Dec 25 21:59:14 CET 2007


On Tue, Dec 25, 2007 at 08:25:24PM +0100, Reimar Döffinger wrote:
> Hello,
> On Tue, Dec 25, 2007 at 08:04:17PM +0100, Krzysztof Duchnowski wrote:
> > Rich Felker pisze:
> > > On Fri, Dec 21, 2007 at 03:13:21AM +0100, RVM wrote:
> > >> Well, at least I know there's nothing wrong in my program. I hope you can 
> > >> finally fix this bug but until then I can pass the short name to mplayer, so 
> > >> it's not a big deal.
> > 
> > > The problem is that it's a bug in Windows not in MPlayer, and it
> > > requires some wrapper hackage to work around the bug..
> > 
> > Yes.
> > Not even native Windows player could overcome this and for such a file 
> > it couldn't be even renamed under Windows to clean up from this non 
> > latin character.
> > But, suprisingly, eMule can rename such a file under Windows - maybe 
> > it's a some clue.
> 
> That is not surprising, because it is not actually a Windows bug, but
> "only" a horrible design decision, namely to make internationalization
> and all-or-nothing approach with the predictable effect of most people
> taking the "nothing" road - since the "all" road can mean a
> rewrite of major parts, all at once while at the same time completely
> loosing compatibility with Windows 9x unless you take extra measure (I
> think an extra dll is enough usually, but still).
> Not to mention that it is an approach that doubles memory and possibly
> disk usage for applications handling lots of mostly ASCII strings.

The method you describe is the idiotic way MS recommends developers to
do it, but it's not necessary to use the MS WCHAR crap all over the
place. The problem is that you need to use the unicode-aware Windows
FS access functions rather than the legacy Windows FS access
functions, and the Mingw semi-posix layer wraps the wrong ones. :(
Thus accessing the filesystem robustly cannot be done in portable apps
that want to use the standard C or POSIX api; you have to pollute your
code with windows-specific crap which will not be done in MPlayer. The
alternative is to fix mingw (or write a wrapper layer around mingw),
which is an option, and I'll be happy to advise anyone interested in
doing that.

Rich



More information about the MPlayer-users mailing list