Fix bug #13262 with crashes in completion on MS-Windows with non-ASCII filenames.
commitf5c81c80c109fcaca04b25e08c34848110e2550b
authorEli Zaretskii <eliz@gnu.org>
Mon, 24 Dec 2012 16:15:13 +0000 (24 18:15 +0200)
committerEli Zaretskii <eliz@gnu.org>
Mon, 24 Dec 2012 16:15:13 +0000 (24 18:15 +0200)
treeab61da6d934e63e361fb1a4915a59325ee95ac9c
parent216ed9cc435743a596b04917605d29f5ea562e7e
Fix bug #13262 with crashes in completion on MS-Windows with non-ASCII filenames.

 src/fileio.c (file_name_as_directory, directory_file_name): Accept
 an additional argument MULTIBYTE to indicate whether the input C
 came from a multibyte or a unibyte Lisp string; all callers
 adjusted.  Don't assume the input string is always multibyte.
 (Ffile_name_directory) [DOS_NT]: Handle unibyte strings correctly:
 don't ENCODE_FILE them, and return a unibyte string if the input
 was unibyte.
 (Fexpand_file_name): Don't mix unibyte with multibyte strings, and
 don't assume the input strings will always be multibyte.  If the
 input strings are multibyte, decode strings obtained from C
 library functions.
src/ChangeLog
src/fileio.c