[vlc-devel] Re: Non-western character encoding

Måns Rullgård mru at inprovide.com
Sun Mar 12 15:49:52 CET 2006

Rémi Denis-Courmont <rem at videolan.org> writes:

> Le Dimanche 12 Mars 2006 14:26, Måns Rullgård a écrit :
>> Unfortunately, the Asian scripts all commonly use several encodings.
>> Deciding on a single encoding to use would be a mistake.
> I don't expect selecting a single encoding to be a good solution. But I 
> would expect it to be a better solution than what we currently have, 
> i.e.:
> - if the local character encoding is UTF-8, use CP1252,
> - if not, use the local character encoding.

How is "the local character encoding" determined?

> The current approach might work almost fine on Windows, but it 
> definitely sucks on Linux and Mac OS X. What I propose is changing the 
> single encoding associated with each country to something more likely 
> to work. It still sucks in Asia, but it sucks way less.
> For instance, using Shift-JIS by default in Japan is probably way more 
> better than EUC-JP (when LANG=ja_JP), or even worst CP1252 (when 
> LANG=ja_JP.UTF-8).

If LC_ALL, LC_CTYPE or LANG (checked in that order) specifies an
encoding, that should be used.  If none is specified, the best that
can be done is to choose a default for each locale.  The user should
always have an options to override the default should s/he wish to.

> I am fully aware it will still break if a Morrocan tries to use French 
> subtitles, but still.

That's why the idea of a system-wide locale setting is flawed.

Måns Rullgård
mru at inprovide.com

This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html

More information about the vlc-devel mailing list