[mythtv] Ticket #5822: mythmusic cannot see any files with accents or internationnal characters

Lee Koloszyc teething12 at hotmail.com
Thu Dec 11 12:07:04 UTC 2008


I just wanted to let you know I have found a work around for this.
I'm not really versed in linux/QT development but after playing around 
for a while I found that adding:
QTextCodec::setCodecForLocale(QTextCodec::codecForName("ISO-8859-1"));
to the beginning of the BuildFileList function of filescanner.cpp, my 
machine was able to pick up the files with international/accented 
characters and is able to play them back.

It is my assumption this is not the correct fix because ISO-8859-1 
should be whatever the locale is on the machine. 

I was able to reproduce the problem using a Console application and not 
starting with QCoreApplication a(argc, argv), in this case no files with 
international characters show up, by either including it or setting the 
CodecForLocale manually, entryInfoList() is able to find the files.  I'm 
pretty sure mythtv declares QApplication so I am not sure as to the whys 
CodecForLocale isn't set automatically in mythmusic.  I haven't been 
able to debug directly from mythmusic yet, but if this helps or anyone 
has some hints I would be glad to look at it further and create a patch.

Lee


_________________________________________________________________
Send e-mail anywhere. No map, no compass.
http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_anywhere_122008
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-dev/attachments/20081211/f5696178/attachment.htm 


More information about the mythtv-dev mailing list