Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 92017 - [Tracker] Russian messages broken for utf8 locale
Summary: [Tracker] Russian messages broken for utf8 locale
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords: Tracker
: 105241 120734 124925 (view as bug list)
Depends on: 77175 93664
Blocks:
  Show dependency tree
 
Reported: 2005-05-09 09:05 UTC by Peter Volkov (RETIRED)
Modified: 2012-01-28 12:18 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
mplayer-1.0_pre7-r1.ebuild with unicode support (mplayer-1.0_pre7-r1.ebuild,16.19 KB, text/plain)
2005-09-06 05:04 UTC, Azamat H. Hackimov
Details
mplayer-1.0_pre7-r1.ebuild (20051201) with unicode support (mplayer-1.0_pre7-r2.ebuild,16.41 KB, text/plain)
2005-12-07 09:22 UTC, Azamat H. Hackimov
Details
mplayer-1.0.20060102-r1.ebuild (mplayer-1.0.20060102-r1.ebuild,16.09 KB, text/plain)
2006-01-28 11:27 UTC, David Watzke
Details
mplayer-1.0.20060302 with utf8 support (mplayer-1.0.20060302-r1.ebuild,16.38 KB, text/plain)
2006-03-04 03:43 UTC, David Watzke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Volkov (RETIRED) gentoo-dev 2005-05-09 09:05:51 UTC
Hello.

I'm using utf8 locale and I have problems with reading messages from man and mplayer programs. I've already reported http://bugs.gentoo.org/show_bug.cgi?id=77175 about mplayer. Same about man: Both mplayer and man do not use getext for translating messages. They use their own mechanism, that does not take in account that there are exist different encodings for one language. For example in russian we have commonly used three encodings: koi8-r, cp1251, utf8. The problem is that all russian messages in man and mplayer are encoded with koi8-r and if one have other locale, utf8 like me, I can not read russian messages. Some crappy text is on my screen instead of informational message.

Yes. I know that bug like this should be fixed by upstream developers. And I'm going to report about this problem to upstream developers. But this is long story... I'm sure that modern distribution should not show user quadrants instead of readable text. For example, Red Hat followers do not have such problems.

There exist general tendency toward utf8 locale. Taking in account this fact I think it's necessary to give the rains of government in user's hands, while the programmers are looking for more general solution.

As a partial solution we can use existant utf8 flag or better introduce new nls-utf8 flag and  then add this something like this in man ebuild:

if useq nls; then
       if useq utf8 ; then
               iconv -f koi8-r -t utf8 msgs/mess.ru > mess.ru
               mv mess.ru msgs/mess.ru
               sed 's/koi8-r/utf8/' msgs/mess.ru.codeset > mess.ru.codeset
               mv mess.ru.codeset msgs/mess.ru.codeset
       fi
fi

and something like this in mplayer ebuild:

if useq nls; then
  if useq utf8 ; then
    iconv -f koi8-r ${S}/help/help_mp-ru.h > ${S}/help/help_mp-ru_utf8.h
    mv ${S}/help/help_mp-ru_utf8.h ${S}/help/help_mp-ru.h
  fi
fi

If there exist a better solution, please, tell me. But I think stange to force users either not to have localisation or to look for workarounds by himself. Let's do some uniform solution for now.

There exist manpages-ru that also need such fix. All manpages are koi8-r encoded.

I can do all necessary patches for this three packages, but first I want to listen for developers opinions about what is the best way to implement this? Or more specifically what USE flag it's better to use?

Thank you for your time,
Peter.

Reproducible: Always
Steps to Reproduce:
Comment 1 Reimar Döffinger 2005-05-10 12:08:37 UTC
MPlayer since 2005/02/26 has a --charset configure option that will convert the help messages to the given charset. It will only work for languages where a help/help_mp-??.h.charset file exists - unfortunately not all translators responded to my call to add it.
Man pages are a different thing - I had hoped that man would be able to handle it.
Comment 2 fabiolla 2005-07-07 15:54:28 UTC
Hi, 
Some users have reported the same problem with german language in the forum.
Mplayer: http://forums.gentoo.org/viewtopic-t-350218-highlight-unicode.html
Man:http://forums.gentoo.org/viewtopic-t-357032.html

I think, Peter has made a good solution-suggestion for this problem.
greetings
Martin
Comment 3 Azamat H. Hackimov 2005-09-06 05:04:06 UTC
Created attachment 67734 [details]
mplayer-1.0_pre7-r1.ebuild with unicode support

Here latest ebuild (mplayer-1.0pre7-r1 from rsync) with unicode support.
Now configure script support option "--charset".
Added keyword - unicode.
Supported language: bg cs de en hu pl ru uk.

I added this code:
[quote]
# Added workaround for support unicode
if use unicode
then
  LANG=( $LINGUAS )
  if [ -e ${S}/help/help_mp-${LANG[0]}.h.charset ]
  then
    myconf="${myconf} --charset=utf-8"
  else
    LANG_CC=${LANG[0]}
    if [ ${#LANG_CC} -ge 2 ]
    then
    LANG_CC=${LANG_CC:0:2}
    if [ -e ${S}/help/help_mp-${LANG_CC}.h.charset ]
      then
	myconf="${myconf} --charset=utf-8"
      else
	ewarn "Can't convert ${LANG[0]} or ${LANG_CC} to Unicode, leave it as
is."
      fi
    fi
  fi
fi
[/qoute]

$LANG_CC variable need for locale with name zh_TW, pt_BR etc.

I hope, this would be useful :).
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2005-09-08 17:49:38 UTC
*** Bug 105241 has been marked as a duplicate of this bug. ***
Comment 5 Azamat H. Hackimov 2005-12-07 09:22:54 UTC
Created attachment 74237 [details]
mplayer-1.0_pre7-r1.ebuild (20051201) with unicode support

Here new version synced with portage tree.
And so... ANYBODY HEAR ME? Who lead utf8 team? Where comments for first bug
file? Hey, don't sleep!
Comment 6 Alexander Simonov 2005-12-08 14:32:02 UTC
(In reply to comment #5)
> Created an attachment (id=74237) [edit]
> mplayer-1.0_pre7-r1.ebuild (20051201) with unicode support
> 
> Here new version synced with portage tree.
> And so... ANYBODY HEAR ME? Who lead utf8 team? Where comments for first bug
> file? Hey, don't sleep!

I am already ansver on your question. It's bad things about used iconv in ebuild 
and convert text to utf-8.
I think it's would be better if upstream provide separate transates for 
different locales.

 
Comment 7 Anton Romanov 2005-12-08 23:15:58 UTC
he just sets --charset=utf-8 with unicode use flag
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2006-01-28 10:05:47 UTC
*** Bug 120734 has been marked as a duplicate of this bug. ***
Comment 9 David Watzke 2006-01-28 11:27:11 UTC
Created attachment 78369 [details]
mplayer-1.0.20060102-r1.ebuild

This ebuild works for me fine...
Comment 10 Luca Barbato gentoo-dev 2006-01-29 05:40:02 UTC
could you please past it also as diff?
(yes, I'm lazy sometimes)
Comment 11 David Watzke 2006-01-29 06:13:39 UTC
Okay, here it is...

13c13
< v4l v4l2 win32codecs X xanim xinerama xmms xv xvid xvmc"
---
> unicode v4l v4l2 win32codecs X xanim xinerama xmms xv xvid xvmc"
434c434
<
---
>       use unicode && myconf="${myconf} --charset=utf-8"
Comment 12 David Watzke 2006-02-14 10:42:43 UTC
And to DEPEND we will need to add line:

unicode? ( app-i18n/enca )

When I removed enca after compiled it with --charset=utf-8, then it fails to start:
$ mplayer 040\ Autoskola.avi
mplayer: error while loading shared libraries: libenca.so.0: cannot open shared object file: No such file or directory
So I think it depends on it...
Comment 13 Jakub Moc (RETIRED) gentoo-dev 2006-03-04 03:19:15 UTC
*** Bug 124925 has been marked as a duplicate of this bug. ***
Comment 14 Jakub Moc (RETIRED) gentoo-dev 2006-03-04 03:31:19 UTC
*** Bug 124925 has been marked as a duplicate of this bug. ***
Comment 15 David Watzke 2006-03-04 03:43:26 UTC
Created attachment 81278 [details]
mplayer-1.0.20060302 with utf8 support

Btw: Enca is not dependency...

Please add it to tree with this modification, it is not dangerous, it's just one safe option for ./configure, which 'll make good. It's really boring to edit each new versions ebuild... Thanks.
Comment 16 Azamat H. Hackimov 2006-03-06 00:36:36 UTC
(In reply to comment #15)
> mplayer-1.0.20060302 with utf8 support

One question: why utf8 instead unicode? It is pricipial difference or not?
Comment 17 Azamat H. Hackimov 2006-03-06 00:41:45 UTC
Sorry, it's me again :)

Ebuild work pretty fine for me (Russian with unicode), but in console mplayer says:
"libpng warning: Incomplete compressed datastream in iCCP chunk
libpng warning: Profile size field missing from iCCP chunk"

++ more same warnings below.

This is no critical error, mplayer runs without crashing.
Comment 18 David Watzke 2006-03-06 04:55:31 UTC
> (In reply to comment #15)
> > mplayer-1.0.20060302 with utf8 support
> 
> One question: why utf8 instead unicode? It is pricipial difference or not?
> 

Well, in ebuild's added line:
use utf8 && myconf="$myconf --charset=utf-8"
So I think utf8 is better choice. But doesn't matter.
Comment 19 Evgeniy Dushistov 2006-03-21 08:31:10 UTC
>As a partial solution we can use existant utf8 flag or better introduce new nls-utf8 flag and  then >add this something like this in man ebuild:

you can look at 
http://bugs.gentoo.org/show_bug.cgi?id=93664

with full fix, it works fine in ru_RU.{CP1251,UTF-8,KOI8-R}
or should work :)
Comment 20 David Watzke 2006-05-07 13:04:53 UTC
Fixed, innit ?
Comment 21 Azamat H. Hackimov 2006-05-07 15:25:03 UTC
Well, one year ago (hehe, anniversary).
So, latest ebuild mplayer-1.0-20060415 work fine, but solving problem by disabling l10n... too hard, is didn't? For unknown reason section of hadling LINGUAS commented.
I rollback to mplayer-1.0-20060408 and for me mplayer runs with russian cyrilic simbols... at last.
Comment 22 Luca Barbato gentoo-dev 2006-05-10 05:26:02 UTC
it will be reenable on mplayer release (or withing a week). I disable it just because not every language was updated to the new infrastructure fixing localization problems.
Comment 23 David Watzke 2006-05-11 06:02:50 UTC
See http://bugzilla.mplayerhq.hu/show_bug.cgi?id=441 :-)
Comment 24 Matthias Schwarzott gentoo-dev 2006-12-06 04:41:25 UTC
This bug is now a Tracker to get an overview of affected packages, but no longer contains patches/bug-descriptions/...
Comment 25 Pacho Ramos gentoo-dev 2012-01-28 12:18:31 UTC
Closing this as utf8 herd no longer exists (it was dead for ages) and the only two packages with reported problems are only two and both with their own bug reports