Bug 227909 - stream tags in utf8 encoding is shown incorrectly
Summary: stream tags in utf8 encoding is shown incorrectly
Status: RESOLVED DUPLICATE of bug 212099
Alias: None
Product: Phonon
Classification: Frameworks and Libraries
Component: Xine backend (show other bugs)
Version: 4.3.0 (KDE 4.2.0)
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Harald Sitter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-21 10:06 UTC by Oleg
Modified: 2011-01-16 18:43 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg 2010-02-21 10:06:47 UTC
Version:           2.2.2 (using 4.3.4 (KDE 4.3.4), Debian packages)
Compiler:          cc
OS:                Linux (x86_64) release 2.6.32-2-amd64

Stream example: http://mp3.nashe.ru/nashe-192
Tags of this stream is cyrillic encoded utf8. When trying to play with amarok it shows something unreadable instead of cyrillic.
But it work fine in other players (tested mplayer, vlc, amarok 1.4).
My locale is:
$ locale
LANG=ru_RU.UTF-8
LANGUAGE=
LC_CTYPE="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LC_ALL=
Comment 1 Myriam Schweingruber 2010-02-21 11:49:31 UTC
Confirmed with current git, using the en_US.UTF-8 locales
Comment 2 Kapcsándi István 2011-01-16 14:26:01 UTC
IMHO the problem is in the phonon xine backend, especially where we want to decide how we should handle the meta strings.
We check each meta string that is utf8 encoded or not. I think this check is wrong - because this way the isUtf8 variable never can be true: false & true is always false. 

pisti@pisti-noti:~/kde/src/phonon-4.7.0really4.4.2/xine$ git diff -u
diff --git a/xine/xinestream.cpp b/xine/xinestream.cpp
index 4817073..f2ec75c 100644
--- a/xine/xinestream.cpp
+++ b/xine/xinestream.cpp
@@ -748,7 +748,7 @@ void XineStream::updateMetaData()
     };
     bool isUtf8 = false;
     for (int i = 0; !isUtf8 && i < 8; ++i) {
-        isUtf8 &= checkIsUtf8(meta[i]);
+        isUtf8 |= checkIsUtf8(meta[i]);
     }
     QTextCodec *codec = QTextCodec::codecForMib(106); // utf-8
     if (!isUtf8) {
Comment 3 Myriam Schweingruber 2011-01-16 18:43:29 UTC

*** This bug has been marked as a duplicate of bug 212099 ***