Lines 30-35
Link Here
|
30 |
#include "luks.h" |
30 |
#include "luks.h" |
31 |
#include "config.h" |
31 |
#include "config.h" |
32 |
|
32 |
|
|
|
33 |
#ifdef BUILD_NATSPEC |
34 |
#include "natspec.h" |
35 |
#endif |
36 |
|
37 |
|
38 |
|
33 |
/* Using our private realpath function */ |
39 |
/* Using our private realpath function */ |
34 |
#include "realpath.h" |
40 |
#include "realpath.h" |
35 |
|
41 |
|
Lines 727-740
Link Here
|
727 |
/* if no charset was set explicitly, autodetect UTF-8 */ |
733 |
/* if no charset was set explicitly, autodetect UTF-8 */ |
728 |
if( !iocharset ) { |
734 |
if( !iocharset ) { |
729 |
const char* codeset; |
735 |
const char* codeset; |
730 |
codeset = nl_langinfo( CODESET ); |
|
|
731 |
|
736 |
|
732 |
debug( "no iocharset given, current locale encoding is %s\n", codeset ); |
737 |
#ifdef BUILD_NATSPEC |
|
|
738 |
codeset = natspec_get_filename_encoding(""); |
739 |
debug( "no iocharset given, current locale encoding is %s\n", codeset ); |
740 |
debug("no iocharset given, using libnatspec: %s\n",codeset); |
741 |
iocharset = strdup(codeset); |
733 |
|
742 |
|
|
|
743 |
#else |
744 |
codeset = nl_langinfo( CODESET ); |
745 |
debug( "no iocharset given, current locale encoding is %s\n", codeset ); |
734 |
if( codeset && !strcmp( codeset, "UTF-8" ) ) { |
746 |
if( codeset && !strcmp( codeset, "UTF-8" ) ) { |
735 |
debug( "locale encoding uses UTF-8, setting iocharset to 'utf8'\n" ); |
747 |
debug( "locale encoding uses UTF-8, setting iocharset to 'utf8'\n" ); |
736 |
iocharset = "utf8"; |
748 |
iocharset = "utf8"; |
737 |
} |
749 |
} |
|
|
750 |
#endif |
751 |
|
752 |
|
738 |
} |
753 |
} |
739 |
|
754 |
|
740 |
/* clean stale locks */ |
755 |
/* clean stale locks */ |