Bug 985 - Filename encoding is hardcoded to be latin1 (iso-8859-1)
Summary: Filename encoding is hardcoded to be latin1 (iso-8859-1)
Status: ASSIGNED
Alias: None
Product: BpmDj - old linux tools
Classification: Unclassified
Component: selector (show other bugs)
Version: 3.8
Hardware: PC Linux
: Future normal
Assignee: Werner Van Belle
URL:
Depends on:
Blocks:
 
Reported: 2009-02-18 16:04 CET by Tilman Vogel
Modified: 2010-08-10 15:27 CEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Comment 2 Werner Van Belle 2010-08-10 15:27:20 CEST
Good, I have been delving somewhat into this and solving this 'little' problem is not that simple. First of all the encoding is fixed to be latin is due to the fact that I use fromAscii and toAscii convertors in Qt. This is not exactly as we might want. 

However, the alternative: to use fromLocal8Bit and toLocal8bit (both would take the defined locale into account), do not preserver the convertion. so 

tolocal8bit(fromlocal8bit(string)) is not always the same as string; which leads to files we cannot open. 

Now, because I am converting certain sections of the software to be more unicode compliant we will start storing data in Utf8 format. The problem then become bytes that represent non-existing unicode characters. These are not preserved either and again -> file cannot be opened.

The option to ask the user to actually force his filenames to be correct, also in the locale internationalisation, might be too difficult. Not everybody wants to spend 3 days renaming songs due to an ø or ü that is no longer valid due to a changed internationalisation, or due to a NFS share that reports the wrong information, or due to a zip file that didn't properly store the filename. 

Currently it is unclear how we can solve this problem.
Comment 1 Bernard Fortz 2009-02-19 08:55:43 CET
Indeed I have the same problem.
I think the idea to fix it should be to make the encoding depend on the LANG environment variable of the system.
Description Tilman Vogel 2009-02-18 16:04:38 CET
The music-directory scanner assumes the filenames to be latin1 encoded. I am using UTF-8 (as most current Linux distros do). When filenames contain special characters as üöäø, bpmdj will show funny characters instead.

I temporarily worked around that by renaming my files to latin1 (using convmv) but now they look strange in the shell, of course...

(Anyway, as this is my first report: I am _deeply_ impressed by bpmdj! Thank you!)