I am using QT java to convert QT-readable files to AIFF files,
which are then imported into my program. I am having a problem that,
presumably, relates to unicode. I am still researching it, but I thought
I'd throw it out here BEFORE loosing all my hair seearching through the
QT Java documentation.
Anyway, the code in question goes like this:
QTFile qtIn = new QTFile(source);
QTFile qtOut = new QTFile(target);
//While testing, make sure the file names -- especially the
// output file names -- look right!
JOptionPane.showMessageDialog(
null,
new String[] {
"from: " + qtIn .getPath(),
"to: " + qtOut.getPath() },
"Importing",
JOptionPane.ERROR_MESSAGE);
//create the movie for conversion:
OpenMovieFile omFile = OpenMovieFile.asRead(qtIn);
final Movie movie = Movie.fromFile(omFile);
//set the ProgressProc:
if( progressListener != null )
movie.setProgressProc(progressListener);
// now we convert the movie to an AIFF
final int exportType = StdQTConstants.kQTFileTypeAIFF; // save as an AIFF
movie.convertToFile(qtOut, // name of output movie
exportType, //type of file to export
StdQTConstants.kMoviePlayer, // set the creator to MoviePlayer
0 ); //I've tried various things from IOConstants here
It works fine as long as the charactors in the name are ASCII. If it
contains, say, french charators, the file conversion happens but the
output file name is garbled wherever there was a non-ascii charactor. The
worst part is I can't even figure out how it's been garbled, so the file
is just about impossible to find programitically (if I could find it, I
could at least rename it, which is lame, but it would be a workaround.)
As the code indicates, I have tried several things as the last argument to
movie.convertToFile, but I always get the same garbage.
Like I said, any help is appretiated!
thanks,
bjorn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-java mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-java/email@hidden