Re: [Easytag-mailing] another flac tag problem



Mon, 11 Jun 2007 11:26:03 +0300, Doruk Fisek <dfisek fisek com tr> :

> >     Are you sure that you can't show the Artist and Title fields? As
> > I haven't such problem as you can see below, all work fine :
> Yes, attached is how it looks in my system.
This seems to be a locale problem caused by i-I translation difference
in Turkish locale.

Onur Kucuk (onur pardus org tr) has prepared a patch that fixes the
problem, if you'd audit (I attached it).

                   Doruk

--
FISEK INSTITUTE - http://www.fisek.org.tr
diff -Nur easytag-2.1.3-old/src/et_core.c easytag-2.1.3/src/et_core.c
--- easytag-2.1.3-old/src/et_core.c	2007-10-19 16:01:04.000000000 +0300
+++ easytag-2.1.3/src/et_core.c	2007-10-19 17:13:22.000000000 +0300
@@ -459,6 +459,7 @@
     guint         ETFileKey;
     guint         undo_key;
     gchar        *filename_utf8 = filename_to_display(filename);
+    const gchar        *locale_temp = get_locale();
 
     if (!filename)
         return ETCore->ETFileList;
@@ -483,6 +484,9 @@
     FileTag = ET_File_Tag_Item_New();
     FileTag->saved = TRUE;    /* The file hasn't been changed, so it's saved */
 
+    /* Avoid upper/lower conversion bugs (like I->i conversion in some locales)  in tag parsing */
+    setlocale(LC_CTYPE, "C");
+
     switch (ETFileDescription->TagType)
     {
 #ifdef ENABLE_MP3
@@ -519,6 +523,9 @@
             break;
     }
 
+    /* Restore active locale */
+    setlocale(LC_CTYPE, locale_temp);
+
     /* Fill the ET_File_Info structure */
     ETFileInfo = ET_File_Info_Item_New ();
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]