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