Subject: bug#15426: 24.3.50; Multibyte filenames and directory-files in unibyte buffer

From: Eli Zaretskii <[email-masked]>
Date: Fri, 20 Sep 2013 22:08:26 +0300

> From: Andreas Politz <[email-masked]>
> Cc: [email-masked]
> Date: Fr, 20 Sep 2013 20:51:09 +0200
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > Why did you need to do something like that, and in what real-life use
> > case?
> 
> By default buffer for PDF files are in unibyte mode.  I use
> doc-view-mode and store some custom data in some directory below it's
> cache directory, which I want to remove, when the buffer gets killed.
> The removing of this directory (e.g. .doc-view/FILENAME-83432/data/) is
> done with delete-directory, but fails, if FILENAME contains multibyte
> character (see below).  So I am actually not inserting anything into a
> buffer.

Well, I think somehow your code converts a multibyte string into a
unibyte one.  If you cannot figure out how that happens (e.g., by
stepping with Edebug through the code), perhaps show more of your code
here.  What you sent is backtrace full of byte-compiled code, which is
very hard to interpret.