]> git.sesse.net Git - vlc/commitdiff
Use Latin-9 rather than US-ASCII when there is no local charset
authorRémi Denis-Courmont <rem@videolan.org>
Mon, 15 Aug 2005 15:21:11 +0000 (15:21 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Mon, 15 Aug 2005 15:21:11 +0000 (15:21 +0000)
src/libvlc.c

index 5788cbef6da7aed74f298fcee05ce6ea46c9413e..ac72cfa551991cfa0faf3a6e6728a2108e66ba41 100644 (file)
@@ -1842,6 +1842,16 @@ static void LocaleInit( void )
 
     if( !vlc_current_charset( &psz_charset ) )
     {
+        char *psz_conv = psz_charset;
+
+        /*
+         * Still allow non-ASCII characters when the locale is not set.
+         * Western Europeans are being favored for historical reasons.
+         */
+        psz_conv = strcmp( psz_charset, "ASCII" )
+            ? psz_charset
+            : "ISO-8859-15";
+
         vlc_mutex_init( p_libvlc, &libvlc.from_locale_lock );
         vlc_mutex_init( p_libvlc, &libvlc.to_locale_lock );
         libvlc.from_locale = vlc_iconv_open( "UTF-8", psz_charset );