Ubuntu – Clementine not playing files with certain characters in the name

clementinelocalemusicutf-8

Last week I ripped some cds in morituri and rhythmbox. Everything seemed fine except for one cd. After a few tracks I got some weird error while ripping (to FLAC) with morituri, so I ripped the rest of that cd with rhythmbox.

Afterwards Clementine could not play the tracks I ripped from the cd (as wel those ripped with morituri as those ripped with rhythmbox). Clementine acts as if they are not present in my library. With Rhythmbox however, I can perfectly play all the tracks.

I do have the same problem with some mp3 files I got from a friend. I can play them in Rhythmbox, but Clementine acts as if they do not exist.

How do I get it to work normally again?
I have already tried to reinstall it, deleting the config files, removing the one installed from the repos and installing the latest version from www.clementine-player.org

note: Clementine can perfectly play the other cds I ripped as well as the rest of my music library (mostly in FLAC, with some files in mp3).

I don't know which extra info I can provide, but feel free to ask.

edit: When running clementine in a terminal and then trying to play one of the "problematic" tracks I get the following message:

11:36:48.542 INFO  MoodbarLoader:144                Creating moodbar data for "/home/user138784/Music/Stromae/Racine Carrée/01.Ta fête.flac" 
11:36:48.546 ERROR MoodbarPipeline:134              Error processing  QUrl( "file:///home/user138784/Music/Stromae/Racine Carrée/01.Ta fête.flac" )  : "Resource not found." 
11:36:48.546 ERROR MoodbarPipeline:134              Error processing  QUrl( "file:///home/user138784/Music/Stromae/Racine Carrée/01.Ta fête.flac" )  : "Resource not found." 
11:36:48.571 ERROR GstEnginePipeline:563            2 "gstfilesrc.c(1042): gst_file_src_start (): /GstPipeline:pipeline/GstURIDecodeBin:uridecodebin-15/GstFileSrc:source:
No such file "/home/user138784/Music/Stromae/Racine Carrée/01.Ta fête.flac"" 
11:36:48.572 ERROR GstEnginePipeline:563            2 "gstfilesrc.c(1042): gst_file_src_start (): /GstPipeline:pipeline/GstURIDecodeBin:uridecodebin-15/GstFileSrc:source:
No such file "/home/user138784/Music/Stromae/Racine Carrée/01.Ta fête.flac"" 
11:36:48.681 WARN  GstEngine:572                    Gstreamer error: "Resource not found." 
11:36:48.684 WARN  unknown                          QTimeLine::start: already running 

I think the problem might be related to some characters used in the path to the file. For example, the album "Racine Carrée" can not be played, as well as songs from "Goran Bregović".
As I'm using Beets to organise my music this path is created automatically. Maybe I can edit my Beets config file to exclude special characters.

I'm using Ubuntu 13.10

edit: the locale command returns the following output:

LANG=en_US
LANGUAGE=en_GB
LC_CTYPE="en_US"
LC_NUMERIC="en_US"
LC_TIME="en_US"
LC_COLLATE="en_US"
LC_MONETARY="en_US"
LC_MESSAGES="en_US"
LC_PAPER="en_US"
LC_NAME="en_US"
LC_ADDRESS="en_US"
LC_TELEPHONE="en_US"
LC_MEASUREMENT="en_US"
LC_IDENTIFICATION="en_US"
LC_ALL=

Best Answer

That's bizarre. "Ta fête" or "Ta fête", a UTF-8 locale system should be able to open them fine without problems. I just installed Clementine on a fresh copy of Ubuntu 13.10 and test audio files play fine no matter how I altered their pathnames.
I know this sounds stupid, but could you try checking your current locale by typing locale in the terminal? I doubt it's the problem but doesn't hurt to check.

Try locale -a and see if en_US.UTF-8 and en_GB.UTF-8 are available on your system. If they are, you'll want to open your locale configuration files by typing sudo gedit /etc/default/locale in terminal, and change everything to using en_US.UTF-8 (and LANG to en_GB.UTF-8 if you want UK English instead).

I think LANG alone should be fine, so your locale config file should look like this:

LANG = "en_GB.UTF-8"

After that, reboot your system and try play the files again.

Look at this for more information:
https://help.ubuntu.com/community/Locale#Changing_settings_permanently

If editing /etc/default/locale doesn't work:

First try to manually generate and reconfigure your current locale packages:

sudo locale-gen
sudo dpkg-reconfigure locales

Then nstall the language pack so as to make sure the locales do exist in the first place (just to be on the safe side):

sudo apt-get install language-pack-en-base

Then, open Language Support from System and try dragging English (United States) to the top, and apply it system-wide. Log off and back in, run locale in terminal to see if the changes apply. If it works, great. But it probably won't work if even manually editing the locale file fails, so try sudo gedit /etc/environment in terminal, and add this after PATH:

LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"

Save and reboot to see if it takes effect. You should see locale giving you the correct output this time if it works, otherwise, your system is taking locale settings from some other location instead.

If it still fails to use UTF-8 for your system locale,

sudo gedit etc/bash.bashrc

Add in this to the last line (be careful not to edit anything else):

# Forcing locale to en_US.UTF-8
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"

Save and reboot.

Related Question