Ticket #838 (closed enhancement: fixed)

Opened 2 years ago

Last modified 1 year ago

Need to convert all commandline arguments into unicode

Reported by: md Assigned to: courmisch
Priority: normal Milestone: 0.9.0 features freeze
Component: LibVLC Version: master
Severity: normal Keywords:
Cc: md Platform(s): all
Difficulty: unknown Work status: Not started

Description (Last modified by md)

While fixing #830, I've moved the unicode conversion of argv[] into Win32-specific system init. It turned out, that it's better to convert all arguments, since it enables the user to use localised filenames also in global or mrl-specific options, e.g.:

--sout=std{access=file,mux=ts,dst="Prvá časť.mpg"}
:sout=std{access=file,mux=ts,dst="Prvá časť.mpg"}

The code also has a comment pointing this way:

/* FIXME: should we convert options to UTF-8 as well ?? */

So I suggest to do it for other OSs as well.

Change History

12/20/06 10:51:57 changed by md

  • description changed.

03/03/07 21:07:06 changed by courmisch

I must be missing something. MacOS and BeOS are already UTF-8 and need no conversion. Linux usually needs no conversion either nowadays (and if it does, I think we are already doing it).

03/04/07 09:15:10 changed by md

There are basically two problems left:

* the conversion is being done inside libvlc (i.e. it's also performed for Java/Python bindings etc. although those are typically UTF-capable).

* the conversion is only performed for MRL filenames. No conversion happens for global options and/or MRL specific options.

As of now, we only need conversion for VLC executable if it's being run on UNIX with legacy codepage - so it should be done in VLC's main(), and for *all* arguments.

On Win32 it's already implemented this way.

03/06/07 21:08:21 changed by courmisch

  • status changed from new to assigned.
  • owner set to courmisch.

03/06/07 21:08:31 changed by courmisch

(In [19223]) setlocale() (very) early, so we may have a chance to use nl_langinfo before initializing LibVLC (refs #838)

03/14/07 18:30:00 changed by courmisch

(In [19330]) - Make FromLocale?() usable any time (after setlocale()) - refs #838 - Fix re-entrancy problem for multiple LibVLC in the same process

03/14/07 18:32:24 changed by courmisch

(In [19331]) Remove too late and partial command line charset conversion - refs #838 Note that this provisionaly breaks the command line on non-UTF-8 non-Win32 systems

03/14/07 18:40:41 changed by courmisch

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [19332]) Convert from locale before passing to LibVLC - closes #838