LibVLC 2 filename unicode error

This forum is about all development around libVLC.
spider58
Blank Cone
Blank Cone
Posts: 91
Joined: 28 Jun 2011 14:39

LibVLC 2 filename unicode error

Postby spider58 » 24 Apr 2012 16:15

Hello.

Before upgrade libvlx 1.x to 2.x I was using Video mrl such as UTF8.GETBYTES(mrl_link) before send to libvlc. This is working good with unicode files.
DLL define is below

Code: Select all

[DllImport("libvlc"), CallingConvention:=CallingConvention.Cdecl] internal static extern IntPtr libvlc_media_new(IntPtr p_instance, [MarshalAs(UnmanagedType.LPArray)] byte[] psz_mrl, ref libvlc_exception_t p_exception);
After upgraded to Libvlc 2.x If my filename has no unicode characters, working good . But filename has unicode characters doesn't working.

Is there anybody can help me please?
Besat regards.

spider58
Blank Cone
Blank Cone
Posts: 91
Joined: 28 Jun 2011 14:39

Re: LibVLC 2 filename unicode error

Postby spider58 » 07 May 2012 10:01

bump.

Jo2003
Blank Cone
Blank Cone
Posts: 67
Joined: 08 Feb 2010 13:29

Re: LibVLC 2 filename unicode error

Postby Jo2003 » 14 Aug 2012 09:06

I'm using libVLC in an Qt environment. When using:

Code: Select all

libvlc_media_new_location(pVlcInstance, sMrl.toUtf8().constData())
... if sMrl (which is a QString) contains e.g. cyrillic letters the media can't be opened.

This worked fine on libVLC 1.

So far I've seen this problem only on Windows machines. I'm using Qt 4.8.2 with libVLC2.0.3.

Has someone else this problem?

Best regards,
Jörg

Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: LibVLC 2 filename unicode error

Postby Rémi Denis-Courmont » 14 Aug 2012 09:40

URLs cannot contain non-ASCII characters, and with few exceptions VLC MRL also cannot. Cyrillic letters are always percent-encoded in URLs.

Your MRL is most certainly not encoded correctly.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Jo2003
Blank Cone
Blank Cone
Posts: 67
Joined: 08 Feb 2010 13:29

Re: LibVLC 2 filename unicode error

Postby Jo2003 » 14 Aug 2012 15:12

This absolutely makes sense. Using percent encoding all works well.

Thank you very much!

Best regards,
Jörg

turgut
New Cone
New Cone
Posts: 3
Joined: 08 Dec 2012 15:51

Re: LibVLC 2 filename unicode error

Postby turgut » 08 Dec 2012 15:53

Hi,
Jörg, can you provide solution for percent encoding cyrillic letters in URLs.

Thanks in advance.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 8 guests