--- pmount.c 2005-06-27 16:16:23 +0300 +++ pmount.c.gns 2005-11-12 23:52:32 +0200 @@ -28,6 +28,8 @@ #include "utils.h" #include "luks.h" +#include "natspec.h" + /* error codes */ const int E_ARGS = 1; const int E_DEVICE = 2; @@ -626,14 +628,17 @@ /* if no charset was set explicitly, autodetect UTF-8 */ if( !iocharset ) { const char* codeset; - codeset = nl_langinfo( CODESET ); +// codeset = nl_langinfo( CODESET ); + codeset = natspec_get_filename_encoding(""); debug( "no iocharset given, current locale encoding is %s\n", codeset ); - if( codeset && !strcmp( codeset, "UTF-8" ) ) { - debug( "locale encoding uses UTF-8, setting iocharset to 'utf8'\n" ); - iocharset = "utf8"; - } +// if( codeset && !strcmp( codeset, "UTF-8" ) ) { +// debug( "locale encoding uses UTF-8, setting iocharset to 'utf8'\n" ); +// iocharset = "utf8"; +// } + debug("no iocharset given, using libnatspec: %s\n",codeset); + iocharset = strdup(codeset); } /* clean stale locks */ --- Makefile 2005-11-12 23:51:00 +0200 +++ Makefile.gns 2005-11-12 23:52:39 +0200 @@ -1,4 +1,4 @@ -LIBS=-lsysfs +LIBS=-lsysfs -lnatspec CFLAGS?=-Wall -W -O2 HAL_CFLAGS=$(shell pkg-config hal --cflags) HAL_LDFLAGS=$(shell pkg-config hal --libs)