Bug 65636

Summary: Juk doesn't honor locale setting
Product: [Applications] juk Reporter: Denis Treskunov <daen>
Component: generalAssignee: Scott Wheeler <wheeler>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Denis Treskunov 2003-10-07 04:08:12 UTC
Version:           2.0 Beta 2 (using KDE KDE 3.1.92)
Installed from:    Unlisted Binary Package

Russian characters don't display correctly. Here's output from the locale command:
====================
LANG=ru_RU.cp1251
LC_CTYPE="ru_RU.cp1251"
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="ru_RU.cp1251"
LC_ALL=
====================
Konqueror displays the ID3 fine, as does Noatun. Here's a screenshot showing the same song in Juk and Noatun:
http://daen.theamk.com/juk-bug.png
Comment 1 Scott Wheeler 2003-10-07 20:31:31 UTC
Actually Noatun and Konqueror currently only support ID3v1 (this will change for 3.2, 
but hasn't yet) so if they're properly displaying cyrillic characters that's a bug -- ID3v1 
is strictly ISO-8859-1.  I don't doubt that some things don't complain if you put in 
Cyrillic text, but it *shouldn't* work... 
 
However, JuK currently uses ISO8859-1 ("Latin1") for ID3v2 tags as well, I'll switch 
that to UTF8 in the relatively near future. 
Comment 2 Denis Treskunov 2003-10-07 23:35:28 UTC
Sorry, I didn't know that ID3v1 is 8859-1 only. It works fine on other players 
though, so I think it would be great if Juk read the user's locale settings and 
displayed the tags in the preferred locale, not strictly 8859-1. 
Comment 3 Scott Wheeler 2003-10-26 20:03:29 UTC
Sorry, what you're seeing here is a bug in other players that happens to work for your situation.  But the whole idea of metadata is that it should be something that moves with the file and is independant of the settings on a specific user's machine.  Producing broken files won't help the situation.  :-)  However, as I said, JuK in KDE 3.2 will support unicode tags, just not in the ID3v1 tag.  I'll close this out once support for that is in.
Comment 4 Scott Wheeler 2003-11-12 23:04:51 UTC
Subject: kdemultimedia/juk

CVS commit by wheeler: 

Do UTF8 tagging for ID3v2 tags.  As per the bug report this allows for
pretty much any sorts of strings that KDE can handle for input...

CCMAIL:65636-done@bugs.kde.org


  M +3 -0      tag.cpp   1.49


--- kdemultimedia/juk/tag.cpp  #1.48:1.49
@@ -28,4 +28,5 @@
 #endif
 #include <taglib/xiphcomment.h>
+#include <taglib/id3v2framefactory.h>
 
 #include "cache.h"
@@ -84,4 +85,6 @@ Tag::~Tag()
 void Tag::save()
 {
+    TagLib::ID3v2::FrameFactory::instance()->setDefaultTextEncoding(TagLib::String::UTF8);
+
     if(!m_info.isWritable())
         return;