bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

strings and non-ASCII letters


From: Frank Heckenbach
Subject: strings and non-ASCII letters
Date: Thu, 14 Jun 2001 03:35:58 +0200

Hi,

is there any particular reason why strings sets the locale only for
messages, not ctypes, and explicitly ignores non-ASCII letters? This
way, it fails to find some non-English texts.

Test:

export LC_CTYPE=de_DE
echo "Größe" | ./strings

Suggested patch:

--- binutils-2.11/binutils/strings.c.orig       Tue Jun 12 15:01:24 2001
+++ binutils-2.11/binutils/strings.c    Thu Jun 14 03:24:03 2001
@@ -76,11 +76,7 @@
 #endif
 #endif
 
-#ifdef isascii
-#define isgraphic(c) (isascii (c) && (isprint (c) || (c) == '\t'))
-#else
 #define isgraphic(c) (isprint (c) || (c) == '\t')
-#endif
 
 #ifndef errno
 extern int errno;
@@ -141,7 +137,7 @@
   boolean files_given = false;
 
 #if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
-  setlocale (LC_MESSAGES, "");
+  setlocale (LC_ALL, "");
 #endif
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);

If this mail is going to a list, please CC me since I'm not
subscribed.

Frank

-- 
Frank Heckenbach, address@hidden
http://fjf.gnu.de/
PGP and GPG keys: http://fjf.gnu.de/plan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]