Page 1 of 1

Unicode problem when using JVLC

Posted: 03 Oct 2008 10:28
by marcsto
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

Re: Unicode problem when using JVLC

Posted: 19 Oct 2008 04:30
by marcsto
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");