From 9ad4f3e55659c2833d86e48d8ba0362b927ece52 Mon Sep 17 00:00:00 2001
From: Andrew Innes <andrewi@gnu.org>
Date: Wed, 17 Jan 2001 11:11:53 +0000
Subject: [PATCH] (directory_files_internal): Convert result from readdir to a
 unibyte string initially, to avoid possible misinterpretation of some bytes
 as the internal form of Emacs characters.

---
 src/ChangeLog | 6 ++++++
 src/dired.c   | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index 8b24e335fe0..ae091659f49 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2001-01-17  Andrew Innes  <andrewi@gnu.org>
+
+	* dired.c (directory_files_internal): Convert result from readdir
+	to a unibyte string initially, to avoid possible misinterpretation
+	of some bytes as the internal form of Emacs characters.
+
 2001-01-17  Kenichi Handa  <handa@etl.go.jp>
 
 	* fns.c (concat): Be sure to avoid putting the same `composition'
diff --git a/src/dired.c b/src/dired.c
index 04b14f6c4a5..4994241c2cf 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -218,7 +218,7 @@ directory_files_internal (directory, full, match, nosort, attrs)
 	  struct gcpro gcpro1, gcpro2;
 
 	  len = NAMLEN (dp);
-	  name = finalname = make_string (dp->d_name, len);
+	  name = finalname = make_unibyte_string (dp->d_name, len);
 	  GCPRO2 (finalname, name);
 	  
 	  /* Note: ENCODE_FILE can GC; it should protect its argument,
-- 
2.39.5