cvsdist 7a2237
--- vim60ag/src/xxd/xxd.c.37073	Mon May 21 16:17:29 2001
cvsdist 7a2237
+++ vim60ag/src/xxd/xxd.c	Mon May 21 16:32:12 2001
cvsdist 7a2237
@@ -81,6 +81,7 @@
cvsdist 7a2237
 #if __MWERKS__ && !defined(BEBOX)
cvsdist 7a2237
 # include <unix.h>	/* for fdopen() on MAC */
cvsdist 7a2237
 #endif
cvsdist 7a2237
+#include <locale.h>
cvsdist 7a2237
 
cvsdist 7a2237
 /*  This corrects the problem of missing prototypes for certain functions
cvsdist 7a2237
  *  in some GNU installations (e.g. SunOS 4.1.x).
cvsdist 7a2237
@@ -424,6 +425,11 @@
cvsdist 7a2237
   long length = -1, n = 0, seekoff = 0;
cvsdist 7a2237
   char l[LLEN+1];
cvsdist 7a2237
   char *pname, *pp;
cvsdist 7a2237
+  char *lang=getenv("LANG");
cvsdist 7a2237
+  if(!lang) lang=getenv("LC_ALL");
cvsdist 7a2237
+  if(!lang) lang=getenv("LC_CTYPE");
cvsdist 7a2237
+  if(lang)
cvsdist 7a2237
+	  setlocale(LC_ALL, lang);
cvsdist 7a2237
 
cvsdist 7a2237
 #ifdef AMIGA
cvsdist 7a2237
   /* This program doesn't work when started from the Workbench */
cvsdist 7a2237
@@ -728,7 +734,7 @@
cvsdist 7a2237
 #else
cvsdist 7a2237
 	  (e > 31 && e < 127)
cvsdist 7a2237
 #endif
cvsdist 7a2237
-	  ? e : '.';
cvsdist 7a2237
+	  ? e : isalnum(e) ? e : '.';
cvsdist 7a2237
       if (e)
cvsdist 7a2237
         nonzero++;
cvsdist 7a2237
       n++;