javaencodingvlcj

vlcj mlr special character


I have been stalking this great site for ages. Today I finally decided to create an account when I got stuck on a problem.

My problem is rather basic vlcj executing. I have a program running as an audio player. It is all done except for one problem I cannot seem to figure out.

When someone tried to play a song with a 'é' (e with acute) in the filepath, it seems to translate wrong into the system of vlcj.

Example: I run:

mediaPlayerComponent.getMediaPlayer().playMedia("file:///C:\\test.mp3");
  //(where mediaPlayerComponentis my is my local instantiated 
  // EmbeddedMediaPlayerComponent) 

And this plays fine. But if I run:

mediaPlayerComponent.getMediaPlayer().playMedia("file:///C:\\é.mp3");

It does not run anything.

So to make the question short and sweet: How do I supply the correct 'mrl' to make vlcj play my 'é.mp3'. And/or which MediaOptions are needed to parse the correct encoding (I am assuming my error is here?)

Preemptively sorry for not supplying an SSCCE, I do not think it will be relevant. Thank you for your time.


Solution

  • After some interlude I finally found out what went wrong. Apperantly, under windows international characters arent really parsed very well into VLCJ. By adding:

    <jvmarg value="-Dvlcj.log=DEBUG>
    

    to my ANT-run script, I suddenly could play files with an e-acute. Apperantly the decoder of the JVM is finalized when initializing.

    Hope this helps someone :-)