From dcd74c5f2c90338068e114ebedf0353f976a186c Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 29 Nov 2004 07:16:25 +0000 Subject: [PATCH] (init_buffer): Set current_buffer->directory to a multibyte string made by string_to_multibyte. --- src/buffer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/buffer.c b/src/buffer.c index b3b0407803..2d93127246 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5162,7 +5162,13 @@ init_buffer () } #endif /* not VMS */ - current_buffer->directory = build_string (buf); + current_buffer->directory = make_unibyte_string (buf, strlen (buf)); + if (! NILP (buffer_defaults.enable_multibyte_characters)) + /* At this momemnt, we still don't know how to decode the + direcotry name. So, we keep the bytes in multibyte form so + that ENCODE_FILE correctly gets the original bytes. */ + current_buffer->directory + = string_to_multibyte (current_buffer->directory); /* Add /: to the front of the name if it would otherwise be treated as magic. */ -- 2.20.1