Репозиторий Sisyphus
Последнее обновление: 26 октября 2021 | Пакетов: 17374 | Посещений: 22162571
en ru br
Репозитории ALT
S:2.4.3-alt3
5.1: 2.1.6-alt7
4.1: 2.1-alt1.qa1
4.0: 2.1-alt1
3.0: 1.99.6-alt1
www.altlinux.org/Changes

Группа :: Звук
Пакет: easytag

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: easytag-2.6.0-alt-ru-settings.patch
Скачать


diff --git easytag/src/setting.c easytag/src/setting.c
index 6e67d84..5a8ed38 100755
--- easytag/src/setting.c
+++ easytag/src/setting.c
@@ -395,6 +395,20 @@ void Init_Config_Variables (void)
     AUDIO_FILE_PLAYER                       = g_strdup("xmms -p");
 #endif
 
+    char * charset;
+
+    charset = getenv( "LC_ALL" );
+    if( charset == NULL || charset[0] == '\0' ) {
+        charset = getenv( "LC_CTYPE" );
+        if( charset == NULL || charset[0] == '\0') {
+            charset = getenv( "LANG" );
+        }
+    }
+
+    int ru = ( strncmp( charset, "ru_RU", 5 ) == 0 ) ||
+         ( strncmp( charset, "be_BY", 5 ) == 0 ) ||
+         ( strncmp( charset, "uk_UA", 5) == 0 );
+
     /*
      * File Settings
      */
@@ -415,8 +429,8 @@ void Init_Config_Variables (void)
     WRITE_ID3_TAGS_IN_FLAC_FILE                     = 0;
     STRIP_TAG_WHEN_EMPTY_FIELDS                     = 1;
     CONVERT_OLD_ID3V2_TAG_VERSION                   = 1;
-    USE_NON_STANDARD_ID3_READING_CHARACTER_SET      = 0;
-    FILE_READING_ID3V1V2_CHARACTER_SET              = g_strdup("UTF-8");
+    USE_NON_STANDARD_ID3_READING_CHARACTER_SET      = ru ? 1 : 0;
+    FILE_READING_ID3V1V2_CHARACTER_SET              = ru ? g_strdup("windows-1251") : g_strdup("UTF-8");
     FILE_WRITING_ID3V2_WRITE_TAG                    = 1;
 #ifdef WIN32
     FILE_WRITING_ID3V2_VERSION_4                    = 0;
@@ -425,18 +439,18 @@ void Init_Config_Variables (void)
 #endif
     FILE_WRITING_ID3V2_USE_CRC32                    = 0;
     FILE_WRITING_ID3V2_USE_COMPRESSION              = 0;
-    FILE_WRITING_ID3V2_USE_UNICODE_CHARACTER_SET    = 1;
+    FILE_WRITING_ID3V2_USE_UNICODE_CHARACTER_SET    = ru ? 0 : 1;
 #ifdef WIN32
     FILE_WRITING_ID3V2_UNICODE_CHARACTER_SET        = g_strdup("UTF-16");
 #else
     FILE_WRITING_ID3V2_UNICODE_CHARACTER_SET        = g_strdup("UTF-8");
 #endif
-    FILE_WRITING_ID3V2_NO_UNICODE_CHARACTER_SET     = g_strdup("ISO-8859-1");
+    FILE_WRITING_ID3V2_NO_UNICODE_CHARACTER_SET     = ru ? g_strdup("windows-1251") : g_strdup("ISO-8859-1");
     FILE_WRITING_ID3V2_ICONV_OPTIONS_NO             = 1;
     FILE_WRITING_ID3V2_ICONV_OPTIONS_TRANSLIT       = 0;
     FILE_WRITING_ID3V2_ICONV_OPTIONS_IGNORE         = 0;
     FILE_WRITING_ID3V1_WRITE_TAG                    = 1;
-    FILE_WRITING_ID3V1_CHARACTER_SET                = g_strdup("ISO-8859-1");
+    FILE_WRITING_ID3V1_CHARACTER_SET                = ru ? g_strdup("windows-1251") : g_strdup("ISO-8859-1");
     FILE_WRITING_ID3V1_ICONV_OPTIONS_NO             = 0;
     FILE_WRITING_ID3V1_ICONV_OPTIONS_TRANSLIT       = 1;
     FILE_WRITING_ID3V1_ICONV_OPTIONS_IGNORE         = 0;
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin