]> arthur.barton.de Git - netatalk.git/commitdiff
only try to resolve LOCALE once
authorbfernhomberg <bfernhomberg>
Tue, 15 Jun 2004 01:50:18 +0000 (01:50 +0000)
committerbfernhomberg <bfernhomberg>
Tue, 15 Jun 2004 01:50:18 +0000 (01:50 +0000)
libatalk/unicode/charcnv.c

index 79a151fccaa76fc749f8d3674b8c123526851fe1..a0fa4e3caf72f319390f62902c78b6e8f242754b 100644 (file)
@@ -153,12 +153,12 @@ static const char *charset_name(charset_t ch)
                        atalk_iconv_t handle = atalk_iconv_open(ln,"UCS-2");
                        if (handle == (atalk_iconv_t) -1) {
                                LOG(log_debug, logtype_default, "Locale charset '%s' unsupported, using ASCII instead", ln);
-                               ln = NULL;
+                               ln = "ASCII";
                        } else {
                                atalk_iconv_close(handle);
-                               if (ch==CH_UNIX)
-                                       strlcpy(unixname, ln, sizeof(unixname));
                        }
+                       if (ch==CH_UNIX)
+                               strlcpy(unixname, ln, sizeof(unixname));
                }
                ret = ln;
        }