common-lisp.net
/
projects/asdf/asdf-encodings.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
fb6d1c1
)
Fix the case of files of length 1 or 2.
author
Francois-Rene Rideau
<fare@tunes.org>
Sun, 29 Apr 2012 03:25:28 +0000 (23:25 -0400)
committer
Francois-Rene Rideau
<fare@tunes.org>
Sun, 29 Apr 2012 03:25:28 +0000 (23:25 -0400)
autodetect.lisp
patch
|
blob
|
blame
|
history
diff --git
a/autodetect.lisp
b/autodetect.lisp
index
5205c08
..
ce502df
100644
(file)
--- a/
autodetect.lisp
+++ b/
autodetect.lisp
@@
-274,7
+274,9
@@
;; UTF-16, big-endian.
(setf initial-encoding :utf-16be))
(t
- (setf initial-encoding :latin1)))))
+ (setf initial-encoding :utf-8-auto)))))
+ ((= available 1)
+ (setf initial-encoding (if (< (aref buffer 0) #x80) :ascii :latin1)))
(t
;; Empty file - just use the default.
(setf initial-encoding :default))))))