[PATCH] charset conversion for help messages
Hi, the attached patch adds a --charset option to the configure options that will make MPlayer convert the help_mp-* file to the specified charset - it needs the right from charset to be specified in a help_mp-??.h.charset file. What do you think of this? It is a really small patch, and I think this is quite useful, especially as I think we really should support utf8 - it seems the only useable charset to me. Greetings, Reimar Döffinger
On Sat, Feb 19, 2005 at 12:40:20PM +0100, Reimar Döffinger wrote:
Hi, the attached patch adds a --charset option to the configure options that will make MPlayer convert the help_mp-* file to the specified charset - it needs the right from charset to be specified in a help_mp-??.h.charset file. What do you think of this? It is a really small patch, and I think this is quite useful, especially as I think we really should support utf8 - it seems the only useable charset to me.
Not to me, but I agree it would be usefull and nice to have. What I'd like even more is some kind of autodetection of output charset (based on LC_* settings), which of course could be overridden by --charset. And also if *.charset is missing default to ISO-8859-1. Also, if we already have charset stored somewhere then why not convert manpages on installing? (with some care, not to convert KOI8-R to ISO-8859-2 for example). Not that I'm willing to do it ;) (at least not now, I have a lot on TODO list and this is not going to receive top priority).
Index: configure =================================================================== RCS file: /cvsroot/mplayer/main/configure,v retrieving revision 1.964 diff -u -r1.964 configure --- configure 18 Feb 2005 03:55:27 -0000 1.964 +++ configure 19 Feb 2005 11:35:18 -0000 @@ -1383,6 +1385,7 @@ #_language=en _shm=auto _linux_devfs=no +#_charset=utf8
What is this for? I don't think this should have a default, and not a commented out one for sure. Torinthiel -- Waclaw "Torinthiel" Schiller GG#: 542916, 3073512 torinthiel(at)megapolis(dot)pl gpg: B06901F1 fpr: FAA3 559F CAE9 34DE CDC8 7346 2B6E 39F2 B069 01F1 "No classmates may be used during this examination"
Hi, On Sat, Feb 19, 2005 at 03:04:59PM +0100, Torinthiel wrote:
On Sat, Feb 19, 2005 at 12:40:20PM +0100, Reimar Döffinger wrote:
What do you think of this? It is a really small patch, and I think this is quite useful, especially as I think we really should support utf8 - it seems the only useable charset to me.
Not to me, but I agree it would be usefull and nice to have.
Well, it is the only charset that works if you use several, especially non-european languages...
What I'd like even more is some kind of autodetection of output charset (based on LC_* settings), which of course could be overridden by --charset. And also if *.charset is missing default to ISO-8859-1.
Detection based on LC_* settings seems very unreliable, as well as defaulting to ISO... Getting a .charset file should be no problem for all languages that are actively maintained...
Also, if we already have charset stored somewhere then why not convert manpages on installing? (with some care, not to convert KOI8-R to ISO-8859-2 for example).
I don't know, is this neccessary? I though maybe man can take care of that...
Index: configure =================================================================== RCS file: /cvsroot/mplayer/main/configure,v retrieving revision 1.964 diff -u -r1.964 configure --- configure 18 Feb 2005 03:55:27 -0000 1.964 +++ configure 19 Feb 2005 11:35:18 -0000 @@ -1383,6 +1385,7 @@ #_language=en _shm=auto _linux_devfs=no +#_charset=utf8
What is this for? I don't think this should have a default, and not a commented out one for sure.
Yes, it has a default (empty), which means do no conversion, just as configure currently behaves... Greetings, Reimar Döffinger
Reimar Döffinger wrote:
What I'd like even more is some kind of autodetection of output charset (based on LC_* settings), which of course could be overridden by --charset. And also if *.charset is missing default to ISO-8859-1.
Detection based on LC_* settings seems very unreliable, as well as defaulting to ISO... Getting a .charset file should be no problem for all languages that are actively maintained...
"locale charmap" should be quite reliable... (It's a pity it isn't documented in the locale manpage) -- Tobias PGP: http://9ac7e0bc.uguu.de
Hi,
Detection based on LC_* settings seems very unreliable, as well as defaulting to ISO... Getting a .charset file should be no problem for all languages that are actively maintained...
"locale charmap" should be quite reliable... (It's a pity it isn't documented in the locale manpage)
Yes, sure. Something that isn't documented sure isn't reliable! Not to mention that it says ANSI_X3.4-1968 for me - I strongly doubt that... Greetings, Reimar Döffinger
Reimar Döffinger wrote:
Yes, sure. Something that isn't documented sure isn't reliable! Not to mention that it says ANSI_X3.4-1968 for me - I strongly doubt that...
It will say that, if LC_ALL, LC_CTYPE or LANG is set to C (checked in that order). If that is the case, then the output is perfectly correct. -- Tobias PGP: http://9ac7e0bc.uguu.de
On Sun, Jun 19, 2005 at 03:52:33PM +0200, Tobias Diedrich wrote:
Reimar Döffinger wrote:
Yes, sure. Something that isn't documented sure isn't reliable! Not to mention that it says ANSI_X3.4-1968 for me - I strongly doubt that...
It will say that, if LC_ALL, LC_CTYPE or LANG is set to C (checked in that order). If that is the case, then the output is perfectly correct.
But this one is not perfectly correct: <screen> kraken:~$ echo $LC_ALL kraken:~$ echo $LC_CTYPE kraken:~$ echo $LANG pl_PL kraken:~$ locale charset kraken:~$ </screen> In this case I don't think no answer is a good answer ;) Torinthiel -- Waclaw "Torinthiel" Schiller GG#: 542916, 3073512 torinthiel(at)megapolis(dot)pl gpg: 0906A2CE fpr: EE3E DFB4 C4D6 E22E 8999 D714 7CEB CDDC 0906 A2CE "No classmates may be used during this examination"
Torinthiel wrote:
But this one is not perfectly correct: <screen> kraken:~$ echo $LC_ALL
kraken:~$ echo $LC_CTYPE
kraken:~$ echo $LANG pl_PL kraken:~$ locale charset ^^^^^^^ should be charmap :-)
-- Tobias PGP: http://9ac7e0bc.uguu.de
On Saturday, 19 February 2005 at 15:04, Torinthiel wrote:
On Sat, Feb 19, 2005 at 12:40:20PM +0100, Reimar Döffinger wrote:
Hi, the attached patch adds a --charset option to the configure options that will make MPlayer convert the help_mp-* file to the specified charset - it needs the right from charset to be specified in a help_mp-??.h.charset file. What do you think of this? It is a really small patch, and I think this is quite useful, especially as I think we really should support utf8 - it seems the only useable charset to me.
Not to me, but I agree it would be usefull and nice to have. What I'd like even more is some kind of autodetection of output charset (based on LC_* settings), which of course could be overridden by --charset. And also if *.charset is missing default to ISO-8859-1. Also, if we already have charset stored somewhere then why not convert manpages on installing? (with some care, not to convert KOI8-R to ISO-8859-2 for example).
Fedora has moved to UTF8-encoded manpages in FC1, which I think is a move in the right direction. It'd be interesting to see if other distros have done or are doing the same. SuSE 9.2, for one, still has manpages encoded in local charsets. Gentoo does the same. Any others? R. -- MPlayer RPMs maintainer: http://rpm.greysector.net/mplayer/ "I am Grey. I stand between the candle and the star. We are Grey. We stand between the darkness ... and the light." -- Delenn in Grey Council in Babylon 5:"Babylon Squared"
Hi, On Sat, Feb 19, 2005 at 12:40:20PM +0100, Reimar Döffinger wrote:
the attached patch adds a --charset option to the configure options that will make MPlayer convert the help_mp-* file to the specified charset - it needs the right from charset to be specified in a help_mp-??.h.charset file. What do you think of this? It is a really small patch, and I think this is quite useful, especially as I think we really should support utf8 - it seems the only useable charset to me.
Any objections? Otherwise I will just apply and hope for the documentation maintainers to create the .charset files... If you use --charset and no .charset file exists for the selected language make will fail... Greetings, Reimar Döffinger
On Tue, Feb 22, 2005 at 03:24:00PM +0100, Reimar Döffinger wrote:
Hi, On Sat, Feb 19, 2005 at 12:40:20PM +0100, Reimar Döffinger wrote:
the attached patch adds a --charset option to the configure options that will make MPlayer convert the help_mp-* file to the specified charset - it needs the right from charset to be specified in a help_mp-??.h.charset file. What do you think of this? It is a really small patch, and I think this is quite useful, especially as I think we really should support utf8 - it seems the only useable charset to me.
Any objections? Otherwise I will just apply and hope for the documentation maintainers to create the .charset files... If you use --charset and no .charset file exists for the selected language make will fail...
I don't know how this will fit into full gettext support I plan adding. But what the hell, I'll cope with it when I have time to actually look into gettext support. Oh, BTW. The charset for Polish messages is ISO-8859-2. Torinthiel -- Waclaw "Torinthiel" Schiller GG#: 542916, 3073512 torinthiel(at)megapolis(dot)pl gpg: B06901F1 fpr: FAA3 559F CAE9 34DE CDC8 7346 2B6E 39F2 B069 01F1 "No classmates may be used during this examination"
Hi, On Sat, Feb 19, 2005 at 12:40:20PM +0100, Reimar Döffinger wrote:
the attached patch adds a --charset option to the configure options that will make MPlayer convert the help_mp-* file to the specified charset - it needs the right from charset to be specified in a help_mp-??.h.charset file. What do you think of this? It is a really small patch, and I think this is quite useful, especially as I think we really should support utf8 - it seems the only useable charset to me.
Applied together with (hopefully correct) .charset files for en, de, pl and ru. I will send a message to -docs requesting it for the other langs. Greetings, Reimar Döffinger
participants (4)
-
Dominik 'Rathann' Mierzejewski -
Reimar Döffinger -
Tobias Diedrich -
Torinthiel