Subject: bug#4151: non-utf locale leads to errors in `decode-coding-region' (dired)

From: David Reitter <[email-masked]>
Date: Sat, 15 Aug 2009 08:10:32 -0400

With

export LANG=de_DE.ISO8859-15

on a Mac (NS port), and a directory that contains a folder named  
"Tätää"(i.e. a German umlaut), viewing the directory with `dired'  
fails with an error message.  The trace is below.

The bugs here are
1. `decode-coding-region' signals an error (it is not documented to do  
so)
2. with this locale, "ls -la" will not output utf-8-nfd, even though  
it seems that we expect this.

Debugger entered--Lisp error: (wrong-type-argument wholenump nil)
   decode-coding-region(1 8177 utf-8-nfd)
   insert-directory("/Users/dr/" "-al" nil t)
   dired-insert-directory("/Users/dr/" "-al" nil nil t)
   dired-readin-insert()
   dired-readin()
   dired-internal-noselect("~/" nil)
   dired-noselect("~/")
   run-hook-with-args-until-success(dired-noselect "~/")
   find-file-noselect("~/" nil nil t)