Bug 126807 - The names of artist and song transferred to lyric plugin are in locale rather than utf-8
Summary: The names of artist and song transferred to lyric plugin are in locale rather...
Status: RESOLVED NOT A BUG
Alias: None
Product: amarok
Classification: Applications
Component: Tools/Script Manager (show other bugs)
Version: unspecified
Platform: Mandriva RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-05 18:05 UTC by Funda Wang
Modified: 2008-08-05 22:48 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Funda Wang 2006-05-05 18:05:28 UTC
Version:           1.4beta3 (using KDE KDE 3.5.2)
Installed from:    Mandriva RPMs
OS:                Linux

I've wrote a small lyric script that will fectch lyrics from http://music.yahoo.com.cn (mainly Chinese songs), which works fine with 1.4beta2 and svn at 20060413.

But with svn20060503, the script get garbage output for Chinese songs. I think there might be something wrong(change?) with amaroK itself when dealing with Unicode and international characters.

Note, the script can fetch the lyric for songs in English tags perfectly. If you are interesting with this script, I would like to attach it.
Comment 1 Alexandre Oliveira 2006-05-05 18:19:25 UTC
Since SVN revision 533140, scripts need to output the lyrics in UTF8, instead of using the locale as before. This was necessary exactly to prevent these problems.
On ruby, you can use ".unpack("C*").pack("U*")" to convert the string. There must be similar ways for other languages.
Comment 2 Mark Kretschmann 2006-05-05 18:25:32 UTC
On Friday 05 May 2006 18:05, Funda Wang wrote:
> I've wrote a small lyric script that will fectch lyrics from
> http://music.yahoo.com.cn (mainly Chinese songs), which works fine with
> 1.4beta2 and svn at 20060413.
>
> But with svn20060503, the script get garbage output for Chinese songs. I
> think there might be something wrong(change?) with amaroK itself when
> dealing with Unicode and international characters.


We've changed the way lyrics scripts work: amaroK now expects all text to be 
UTF-8 encoded. So your script must recode to UTF-8, if the text is encoded in 
something else.
Comment 3 Funda Wang 2006-05-06 17:37:16 UTC
OK. Thanks for clearify.

But how about the meta data (artist and title) transferred to script? Does it should be in UTF-8 also? Currently, script will get locale data from amaroK.
Comment 4 Funda Wang 2006-06-11 12:15:13 UTC
I've revised the title of this bug to reflect the actural problem here. The artist and song name transferrred to lyric plugin are in locale charset rather than utf-8 encoded, which will be a problem for Chinese users.
Comment 5 Funda Wang 2006-08-01 04:15:05 UTC
How is it going?
Comment 6 Funda Wang 2006-10-07 06:45:49 UTC
Still valid in amarok 1.4.3
Comment 7 Tobias Knieper 2007-03-03 19:19:14 UTC
Is this still valid for 1.4.5?
Comment 8 Funda Wang 2007-03-20 05:57:01 UTC
Yes. It is still valid in 1.4.5.
Comment 9 Chuck Miller 2008-06-15 07:11:49 UTC
Do you think you could provide the script that generated the error?
Comment 10 Casey Link 2008-06-15 07:17:58 UTC
And test it in Amarok 1.4.9.2 please.
Comment 11 Lydia Pintscher 2008-08-05 22:48:52 UTC
Closing due to lack of feedback.