[MPlayer-dev-eng] Re: [PATCH] print appropriate error when failing to open a file

Rich Felker dalias at aerifal.cx
Thu Dec 15 20:43:49 CET 2005


On Thu, Dec 15, 2005 at 09:29:00PM +0300, Vladimir Mosgalin wrote:
> Hi Reimar D?ffinger!
> 
>  On 2005.12.15 at 14:37:44 +0100, Reimar D?ffinger wrote next:
> 
> > On Thu, Dec 15, 2005 at 01:14:49AM +0300, Vladimir Mosgalin wrote:
> > > Yes it will. If used properly, of course. Well, using gettext is much
> > > better solution (but AFAIK it won't work without setlocale anyway), but
> > > "%ls" argument in printf will convert (wide character) string to correct
> > > character encoding, determined automatically by LC_CTYPE.
> > 
> > Just too bad that setting LC_CTYPE will cause crashes.
> 
> Though I wonder how one million different programs in the world use
> setlocale, gettext and manage to work correctly if setting LC_CTYPE
> causes crashes...

They don't load and run foreign dll's and use huge bloated
replacements for each of the libc functions that are broken by locale.

In any case, using non-C/POSIX LC_CTYPE is NOT AN OPTION.
Is it possible to set LC_CTYPE to C.UTF-8 or POSIX.UTF-8 (or C.* where
* is any encoding)? If so we could use a hack to ignore the language
part of the user's locale and just set the user's preferred character
encoding.

However I don't know if this is even useful. IMO it's better to leave
legacy encodings in a state of painful lack of support and eventually
transition software over to UTF-8-only.

Rich




More information about the MPlayer-dev-eng mailing list