Commit bc7a8996 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

Fix the case of files of length 1 or 2.

parent fb6d1c1a
......@@ -274,7 +274,9 @@
;; UTF-16, big-endian.
(setf initial-encoding :utf-16be))
(setf initial-encoding :latin1)))))
(setf initial-encoding :utf-8-auto)))))
((= available 1)
(setf initial-encoding (if (< (aref buffer 0) #x80) :ascii :latin1)))
;; Empty file - just use the default.
(setf initial-encoding :default))))))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment