[vlc-devel] commit: Reimplement Win32 GetACP() using gettext. ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Jan 30 20:03:24 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jan 30 20:56:04 2010 +0200| [2a9525ee741b927cbeaedda06c1d07808edbe127] | committer: Rémi Denis-Courmont 

Reimplement Win32 GetACP() using gettext.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2a9525ee741b927cbeaedda06c1d07808edbe127
---

 modules/codec/subtitles/subsdec.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/modules/codec/subtitles/subsdec.c b/modules/codec/subtitles/subsdec.c
index 80b2562..ab6fba2 100644
--- a/modules/codec/subtitles/subsdec.c
+++ b/modules/codec/subtitles/subsdec.c
@@ -283,7 +283,19 @@ static int OpenDecoder( vlc_object_t *p_this )
     /* Third, try "local" encoding with optional UTF-8 autodetection */
     if (psz_charset == NULL)
     {
-        psz_charset = strdup (GetFallbackEncoding ());
+        /* xgettext:
+           The Windows ANSI code page most commonly used for this language.
+           VLC uses this as a guess of the subtitle files character set
+           (if UTF-8 and UTF-16 autodetection fails).
+           Western European languages normally use "CP1252", which is a
+           Microsoft-variant of ISO 8859-1. That suits the Latin alphabet.
+           Other scripts use other code pages.
+
+           This MUST be a valid iconv character set. If unsure, please refer
+           the VideoLAN translators mailing list. */
+        const char *acp = vlc_pgettext("GetACP", "CP1252");
+
+        psz_charset = strdup (acp);
         msg_Dbg (p_dec, "trying default character encoding: %s",
                  psz_charset ? psz_charset : "not specified");
 




More information about the vlc-devel mailing list