Bug 113950 - cddb encoding incorrect for local storage
Summary: cddb encoding incorrect for local storage
Status: RESOLVED WORKSFORME
Alias: None
Product: libkcddb
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Richard Lärkäng
URL:
Keywords:
: 119616 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-10-06 10:25 UTC by Thomas Zander
Modified: 2012-10-18 07:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Example freedb file (783 bytes, text/plain)
2005-10-06 10:27 UTC, Thomas Zander
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Zander 2005-10-06 10:26:00 UTC
Version:           1.13 (using KDE 3.4.91 (beta1, >= 20050910), compiled sources)
Compiler:          Target: x86_64-linux-gnu
OS:                Linux (x86_64) release 2.6.13.2

After downloading the freedb (the 500Mb tarball) and unpacking it in $HOME/.cddb I see that the encoding kaudiocreator uses does not match that of the download.

For CDs that have characters above 127 there are always two charactrs missing in the disc info kaudiocreator shows; leading me to think that it assumes utf8 locally.

Example:
I see Bj?k  Which should be Björk (note the missing r in the first).

I suggest to check for validity of utf8 and if there are illegal utf8 chars fall back to the encoding freedb uses (sorry not sure what that is).
Comment 1 Thomas Zander 2005-10-06 10:27:30 UTC
Created attachment 12886 [details]
Example freedb file

Please use this file as an example which should load correctly when placed in
the local cddb database by the user.
Comment 2 Thiago Macieira 2005-10-06 16:07:18 UTC
This file is Latin1-encoded. I wonder how freedb does when you have a non-Latin1 character (like Tatu's Нас не догонят). Obviously it can't be represented in your file. I also don't see any obvious encoding markers.
Comment 3 icefox 2005-10-06 18:34:46 UTC
Change product
Comment 4 Richard Lärkäng 2005-10-09 20:16:19 UTC
I guessed that when freedb added support for utf8, they changed the files to utf8 too since that's what it sends from the server. But it looks like the server does runtime detection of the encoding and converts it if needed.

I've tried before to add some kind of automatic encoding-detection before, but I didn't get good enough result with the Qt/KDE-methods to detect it.

But with the code from the cddb server I seem to get good results, but I need to do some more testing.

I'll do some more testing on that code, and then I'll try to incorporate it in to libkcddb.
Comment 5 Richard Lärkäng 2006-01-07 16:40:42 UTC
*** Bug 119616 has been marked as a duplicate of this bug. ***
Comment 6 Thomas Zander 2012-10-18 07:09:39 UTC
Lets close this one now :)