diff --git a/asdf.lisp b/asdf.lisp
index ba3acc356849323c282bf89d249ecb63f69a8666..acdef743cff10eba0b1095e6a041f8a20395738e 100644
--- a/asdf.lisp
+++ b/asdf.lisp
@@ -91,9 +91,9 @@
     (setf end (length string)))
   (let ((result (copy-seq string)))
     (cond
-      ((every (lambda (x) (or (not (alpha-char-p x)) (and (char>= x #\A) (char<= x #\Z)))) (subseq string start end))
+      ((every (lambda (x) (or (upper-case-p x) (not (alpha-char-p x)))) (subseq string start end))
        (nstring-downcase result :start start :end end))
-      ((every (lambda (x) (or (not (alpha-char-p x)) (and (char>= x #\a) (char<= x #\z)))) (subseq string start end))
+      ((every (lambda (x) (or (lower-case-p x) (not (alpha-char-p x)))) (subseq string start end))
        (nstring-upcase result :start start :end end))
       (t result))))