diff -ru gst-plugins-0.8.11.orig/ext/lame/gstlame.c gst-plugins-0.8.11/ext/lame/gstlame.c
--- gst-plugins-0.8.11.orig/ext/lame/gstlame.c	2005-05-17 17:41:41.000000000 +0900
+++ gst-plugins-0.8.11/ext/lame/gstlame.c	2005-10-26 14:01:10.000000000 +0900
@@ -645,12 +645,80 @@
       value = g_strdup_printf ("%u", ivalue);
       break;
     }
-    case G_TYPE_STRING:
+    case G_TYPE_STRING:{
+      const gchar *env;
+      gsize size;
+      gchar *convbuf;
+      gsize bytes_read;
+
       if (!gst_tag_list_get_string (list, tag, &value)) {
         GST_DEBUG ("Error reading \"%s\" tag value\n", tag);
         return;
       };
+
+      env = g_getenv ("GST_ID3V2_TAG_ENCODING");
+      if (!env || *env == '\0')
+        env = g_getenv ("GST_ID3_TAG_ENCODING");
+      if (!env || *env == '\0')
+        env = g_getenv ("GST_TAG_ENCODING");
+
+      size = strlen (value);
+      convbuf = NULL;
+
+      if (env && *env != '\0') {
+        gchar **c, **csets;
+
+        csets = g_strsplit (env, G_SEARCHPATH_SEPARATOR_S, -1);
+        for (c = csets; !convbuf && c && *c; ++c) {
+          gchar *enc;
+
+          if ((enc = g_convert (value, size, *c, "UTF-8",
+                                &bytes_read, NULL, NULL))) {
+            if (bytes_read == size) {
+              convbuf = enc;
+            } else {
+              g_free (enc);
+            }
+          }
+        }
+        g_strfreev (csets);
+      }
+
+      /* Try current charset (if not UTF-8) */
+      if (!convbuf && !g_get_charset (&env)) {
+        gchar *enc;
+
+        if ((enc = g_locale_from_utf8 (value, size, &bytes_read, NULL, NULL))) {
+          if (bytes_read == size) {
+            convbuf = enc;
+          } else {
+            g_free (enc);
+          }
+        }
+      }
+
+      /* Try ISO-8859-1 */
+      if (!convbuf) {
+        gchar *enc;
+
+        enc = g_convert (value, size, "ISO-8859-1", "UTF-8",
+                         &bytes_read, NULL, NULL);
+        if (enc != NULL && bytes_read == size) {
+          convbuf = enc;
+        } else {
+          g_free (enc);
+        }
+      }
+
+      if (convbuf) {
+        g_free (value);
+        value = convbuf;
+      }
+
+      /* else Fall back to UTF-8 */
+
       break;
+    }
     default:
       GST_DEBUG ("Couldn't write tag %s", tag);
       break;
