diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | TODO | 3 | ||||
-rw-r--r-- | configure.in | 4 | ||||
-rw-r--r-- | src/main.c | 3 |
4 files changed, 9 insertions, 2 deletions
@@ -7,6 +7,7 @@ git - ? - Return to previously opened directory on failed recalculation - Properly display MiB units instead of MB (IEEE 1541 - bug #2831412) - Link to ncursesw when available + - Improved support for non-ASCII characters 1.5 - 2009-05-02 - Fixed incorrect apparent size on directory refresh @@ -24,3 +24,6 @@ Small list of planned features/changes, suggestions are always welcome. This should be both more intuitive and more correct than simply counting a semi-random occurence and ignoring others, as we do now. +- Better handling of multibyte or multicolumn characters + * strlen() <> number_of_columns() <> number_of_characters() + diff --git a/configure.in b/configure.in index 18487a7..c4ee13e 100644 --- a/configure.in +++ b/configure.in @@ -11,7 +11,7 @@ AC_PROG_RANLIB # Check for header files. AC_CHECK_HEADERS( - [limits.h stdlib.h string.h sys/time.h sys/types.h sys/stat.h dirent.h unistd.h fnmatch.h ncurses.h],[], + [limits.h stdlib.h string.h sys/time.h sys/types.h sys/stat.h dirent.h unistd.h fnmatch.h ncurses.h locale.h],[], AC_MSG_ERROR([required header file not found])) # Check for typedefs, structures, and compiler characteristics. @@ -21,7 +21,7 @@ AC_STRUCT_ST_BLOCKS # Check for library functions. AC_CHECK_FUNCS( - [getcwd gettimeofday memset fnmatch chdir rmdir unlink lstat getcwd],[], + [getcwd gettimeofday memset fnmatch chdir rmdir unlink lstat getcwd setlocale],[], AC_MSG_ERROR([required function missing])) @@ -31,6 +31,7 @@ #include <unistd.h> #include <sys/time.h> +#include <locale.h> int pstate; @@ -146,6 +147,8 @@ char *argv_parse(int argc, char **argv) { int main(int argc, char **argv) { char *dir; + setlocale(LC_ALL, ""); + if((dir = argv_parse(argc, argv)) == NULL) dir = "."; |