Page 1 of 1

LibVLC 2 filename unicode error

Posted: 24 Apr 2012 16:15
by spider58
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.

Re: LibVLC 2 filename unicode error

Posted: 07 May 2012 10:01
by spider58
bump.

Re: LibVLC 2 filename unicode error

Posted: 14 Aug 2012 09:06
by Jo2003
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

Re: LibVLC 2 filename unicode error

Posted: 14 Aug 2012 09:40
by Rémi Denis-Courmont
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.

Re: LibVLC 2 filename unicode error

Posted: 14 Aug 2012 15:12
by Jo2003
This absolutely makes sense. Using percent encoding all works well.

Thank you very much!

Best regards,
Jörg

Re: LibVLC 2 filename unicode error

Posted: 08 Dec 2012 15:53
by turgut
Hi,
Jörg, can you provide solution for percent encoding cyrillic letters in URLs.

Thanks in advance.