diff --git a/ChangeLog b/ChangeLog index 3a00578cb0987ccd53004bd069b5091e967ae5d1..c19200489f547370fe3df4f9db120bf4fb2f2d30 100644 --- a/ChangeLog +++ b/ChangeLog @@ -121,6 +121,10 @@ CVS code - - Change erroneous ENABLE_EXTRA #ifdef to NANO_EXTRA to fix a compilation problem when --enable-nanorc isn't used and --enable-extra is. (DLR) +- color.c: + update_color() + - Use mbstrcasecmp() instead of strcasecmp(), so that UTF-8 + color syntax names are properly detected. (DLR) - cut.c: cut_line() - Set placewewant properly after cutting a line, to avoid a @@ -148,6 +152,9 @@ CVS code - - Since lineswritten is a size_t, print its value as an unsigned long instead of an unsigned int. (DLR) - Declare the size_t i only in the loop where it's used. (DLR) + diralphasort() + - Use mbstrcasecmp() instead of strcasecmp(), so that UTF-8 + filenames are sorted properly. (DLR) cwd_tab_completion(), browser_init() - Rename variable next to nextdir to avoid confusion. (DLR) input_tab() diff --git a/src/color.c b/src/color.c index 11bbebe5353c1d25beaf0793724a1b41c3e13c70..336c27dacf026e5e87cb6027eb15ec523c57e107 100644 --- a/src/color.c +++ b/src/color.c @@ -122,7 +122,7 @@ void update_color(void) if (colorstrings == NULL && syntaxstr != NULL) { for (tmpsyntax = syntaxes; tmpsyntax != NULL; tmpsyntax = tmpsyntax->next) { - if (strcasecmp(tmpsyntax->desc, syntaxstr) == 0) + if (mbstrcasecmp(tmpsyntax->desc, syntaxstr) == 0) colorstrings = tmpsyntax->color; } } diff --git a/src/files.c b/src/files.c index d164db18c5ac0e18fc707210eaf7db2c884ad4e2..fddedc7d406098793f5fea146fc4e563702bfc02 100644 --- a/src/files.c +++ b/src/files.c @@ -2008,7 +2008,7 @@ int diralphasort(const void *va, const void *vb) if (!aisdir && bisdir) return 1; - return strcasecmp(a, b); + return mbstrcasecmp(a, b); } /* Free the memory allocated for array, which should contain len