Unicode problem when using JVLC

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
marcsto
Blank Cone
Blank Cone
Posts: 13
Joined: 01 Sep 2008 15:27

Unicode problem when using JVLC

Postby marcsto » 03 Oct 2008 10:28

When making an Java application that uses VLC's java binding (called JVLC), I am unable to play files with Chinese characters (pretty much anything that is not ascii doesn't work).

These files play properly if I open them directly in VLC.

I think I've narrowed down the problem to the MediaDescriptor class. Here's what I see:
1. Create a string that contains a chinese character in the filename
2. Pint out this string. It prints out properly on my console and I can see the Chinese character
3. Create a MediaDescriptor, giving it the path variable from step 1.
4. Print out the MediaDescriptor object's getMrl() string. The string will print out with question marks replacing the Chinese characters of the file name.

Does anyone know if there is a way to resolve this issue?
Thanks,
Marc

marcsto
Blank Cone
Blank Cone
Posts: 13
Joined: 01 Sep 2008 15:27

Re: Unicode problem when using JVLC

Postby marcsto » 19 Oct 2008 04:30

In case anyone else has this problem, here's what you have to do:
Somewhere in your program, type the following command:

Code: Select all

System.setProperty("jna.encoding", "UTF8");


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 52 guests