Closed DavidVentura closed 5 years ago
Dies in exactly
2019-02-06 10:09:26,409 3896 DEBUG koozic odoo.addons.oomusic.models.oomusic_folder_scan: Scanning file "/storage/Media/Music/Arcade Fire - Discography 2001-2013 (By Jamal The Moroccan)/Albums/2004 - Funeral [Japanese Special Limited Edition]/02. Neighborhood 2 (La\udcd0\udcbfka).mp3"
which when I do ls
shows as
02. Neighborhood 2 (Laпka).mp3
(Notice the russian character п
instead of the letter n
)
Which gets resolved by export LC_ALL="en_US.UTF-8"
but there should be a way to detect this
Hum, that's most probably specific to your OS configuration, and the way PostgreSQL is using environment variables. I had to do the exact same in the Dockerfile[1]:
I'll have a look though, but for sure on a standard Ubuntu Server (16.04 and 18.04), this is working fine with the default configuration. Based on your Ansible file, I guess you are running Debian 9?
[1] I was using Debian 9 when I wrote it, I didn't update that part when I switched to Ubuntu 18.04
The postgres db is in another host, so unlikely to be related. I guess this script is reading filenames incorrectly and feeding it to pg
Which OS are you using?
From https://stackoverflow.com/a/51833146
In Python3 all strings are unicode, so the problem you're having is likely due to your locale settings not being correct. The Python3 interpreter looks to use the locale environment variables and if it cannot find them it emulates basic ASCII
I'm on debian. Would be nice to not let this fall to ascii though, enforce utf8
When trying to scan something with non-ascii names (no idea what though, I deleted some files that were in japanese but it still breaks) the scanning will fail immediately:
You can get all the filenames from here
keep in mind the link will expire in 7 days