Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 75645 - MPlayer and UTF-8 locale -> wrong charset
Summary: MPlayer and UTF-8 locale -> wrong charset
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-25 12:44 UTC by Stefan Briesenick (RETIRED)
Modified: 2005-02-26 05:59 UTC (History)
0 users

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


Attachments
Adds help text conversion to utf-8 for some languages (applies to mplayer-1.0_pre5-r5.ebuild) (mplayer_help_unicode.patch,2.35 KB, patch)
2005-02-15 05:32 UTC, Thomas Fischer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Briesenick (RETIRED) gentoo-dev 2004-12-25 12:44:14 UTC
I'm using de_DE.UTF-8 and MPlayer doesn't display german umlauts correctly. With de_DE@euro there's no problem.

I introduced in other ebuild the USE-flag "unicode" and included this code:

# if specified, convert all relevant files from latin1 to UTF-8
if useq unicode; then
    for i in file1 file2 file3 etc; do
        einfo "Convert ${i} to UTF-8"
        iconv -f latin1 -t utf8 -o "${i}~" "${i}" && mv -f "${i}~" "${i}" || rm -f "${i}~"
    done
fi

perhaps we can do this also for MPlayer? Would be great!

Just run 'file' over all relevant files and all with "iso-8869-1" or "latin1" should be included in the for-list, if they have are used for output or are documents/help-files.


Reproducible: Always
Steps to Reproduce:
Comment 1 Stefan Briesenick (RETIRED) gentoo-dev 2004-12-25 15:28:09 UTC
btw: the iconv loop would be a good candidate for the eutils class!

econv -f latin1 -t utf8 <files...>

;-)
Comment 2 Chris White (RETIRED) gentoo-dev 2004-12-26 14:49:37 UTC
This is something I'd rather have upstream take care of, as if I do German, I'd have to do the other languages too.  However, I don't know the codepage used for each and every file, so it would be better to ask them to do it, knowing what locales they have.
Comment 3 Thomas Fischer 2005-02-15 05:32:36 UTC
Created attachment 51270 [details, diff]
Adds help text conversion to utf-8 for some languages (applies to mplayer-1.0_pre5-r5.ebuild)

When the use flag UNICODE is set, this patch converts the help texts for some
languages from their original encodings to utf-8. This way a unicode
console/xterm can display the texts correctly.
Several languages are missing in this patch, but may be added by native
speakers. This patch should be only provisional until the original MPlayer
sources are converted to Unicode/UTF-8.
Comment 4 Stefan Briesenick (RETIRED) gentoo-dev 2005-02-15 09:02:33 UTC
yo, it looks ok to me. Chris? please! :-D
Comment 5 Reimar Döffinger 2005-02-19 03:44:58 UTC
I hope to include a patch in MPlayer soon so that you only need to specify --charset=utf8 to the configure script to achieve this...
For details have a look here: http://mplayerhq.hu/pipermail/mplayer-dev-eng/2005-February/033167.html
Comment 6 Stefan Briesenick (RETIRED) gentoo-dev 2005-02-19 14:54:44 UTC
great! But why not having all stuff in UTF-8 already and convert it at runtime into LOCALE?

Unicode is *the* charset "Esperanto" and UTF-8 is the best encoding for it. One should stop using other charsets (at least internally).
Comment 7 Reimar Döffinger 2005-02-26 05:59:28 UTC
I agree that utf8 is best, but I prefer to let the translators choose their prefered charset.
Also converting to LOCALE is a bit too much "auto-detection" for my taste, I somehow doubt it will work reliably - so anything beyond what this patch does I leave to someone else.
Anyway, that patch is now applied but it works only for languages where the right charset is known (de, en, pl and ru intially, but I expect the rest to follow in a few days).