Opened 16 years ago

Closed 15 years ago

#5822 closed defect (duplicate)

mythmusic cannot see any files with accents or internationnal characters

Reported by: pjsanon@… Owned by: Isaac Richards
Priority: critical Milestone: 0.22
Component: mythmusic Version: head
Severity: medium Keywords: music scan characters accented
Cc: Ticket locked: no

Description

in the file mythmusic/mythmusic/filescanner.cpp the in function BuildFileList? the call to entryInfoList() returns only files that do not contain internationnal characters. A quick search shows that this is related to QT4. Something about the locale not being initialised, so QString::fromLocal8Bit does not work. this is in theory done in QCoreApplication but i do not see how this is acomplished in this plugin. This functions works corretly in 0.21

Change History (3)

comment:1 in reply to:  description Changed 15 years ago by teething12@…

Having never really programmed in Linux or QT, I began looking into this after upgrading to trunk (my wife has a lot of accented character songs).

Anyways after a little bit of playing with a stripped down QT console version of filescanner.cpp, I was able to hack this to work on my box by adding: QTextCodec::setCodecForLocale(QTextCodec::codecForName("ISO-8859-1")); at the beginning of the BuildFileList? function. After running the filescanner again it succesfully added and plays all the songs with special characters.

Playing with my program I noticed that if I don't call QCoreApplication a(argc, argv) prior to the entryInfoList call, it will not return files with accented characters, but by setting the codec it does work.

Also calling QTextCodec::codecForLocale().name() with or without QCoreApplication returns "System". after the setCodecForLocale it returns what I set it too. Haven't checked it in myth yet since I have been doing it remotely.

I'm going to look into this further and try to find a proper solution.

comment:2 Changed 15 years ago by teething12 (Lee)

There is a patch for what I descibe above under this ticket #6292.

comment:3 Changed 15 years ago by stuartm

Resolution: duplicate
Status: newclosed

Duplicate of #6292

Note: See TracTickets for help on using tickets.