--- samba-3.0.22.orig/source/utils/nmblookup.c 2006-02-21 02:33:23.000000000 +0600 +++ samba-3.0.22/source/utils/nmblookup.c 2006-05-18 21:36:29.934167250 +0700 @@ -103,6 +103,12 @@ struct node_status_extra extra; fstring cleanname; +#if defined(HAVE_NL_LANGINFO) && defined(CODESET) && defined(HAVE_SETLOCALE) + char* old_locale; + old_locale=smb_xstrdup(nl_langinfo(CODESET)); + setlocale(LC_CTYPE,""); +#endif + d_printf("Looking up status of %s\n",inet_ntoa(ip)); make_nmb_name(&nname, name, type); status = node_status_query(fd,&nname,ip, &count, &extra); @@ -125,6 +131,13 @@ } else { d_printf("No reply from %s\n\n",inet_ntoa(ip)); } +#if defined(HAVE_NL_LANGINFO) && defined(CODESET) && defined(HAVE_SETLOCALE) + if (old_locale){ + setlocale(LC_CTYPE,old_locale); + free(old_locale); + } +#endif + }