mirror of
https://code.videolan.org/videolan/vlc
synced 2024-09-12 13:44:56 +02:00
f388eb55e1
in use by the OS. It's pretty nifty. if available it uses nl_langinfo. Then it falls back to trying setlocale (exept on OSX, where this funtion is useless) and then falls back to LC_ALL, LC_TYPE and LANG environment variables. If only the LANG variable is available (like on osx) it tries a countrycode to charset mapping (making an educated guess ). On windows it retrieves the charset with GetACP(). It also has an aliases system to transform incompatible charset description strings to libiconv compatible charset descriptions. If you want you can even retrieve the charset on OS/2. * modules/codec/subsdec/subsdec.c: By default we try to open a subtitle file in the systems charset (or language mapped to charset). It's no more than a guess, and if you open Latin1 subs on your Japanese system you will still need to specify the encoding by hand, but it's better then nothing. * src/playlist/playlist.c: spelling error in a comment.
25 lines
1.2 KiB
C
25 lines
1.2 KiB
C
/*****************************************************************************
|
|
* charset.h: Determine a canonical name for the current locale's character encoding.
|
|
*****************************************************************************
|
|
* Copyright (C) 2003 VideoLAN
|
|
* $Id: charset.h,v 1.1 2003/08/23 12:59:31 hartman Exp $
|
|
*
|
|
* Author: Derk-Jan Hartman <thedj at users.sourceforge.net>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
|
|
*****************************************************************************/
|
|
|
|
VLC_EXPORT( vlc_bool_t, vlc_current_charset, ( char ** ) );
|