From cdb078bfba518e29216773677cc72a86ca0ef7f7 Mon Sep 17 00:00:00 2001
From: Christophe Rhodes <csr21@cantab.net>
Date: Sun, 14 Apr 2013 20:01:18 +0100
Subject: [PATCH] improve normalize-string

* now works on non-simple strings;
* more likely to be correct under #!-sb-unicode
---
 src/code/target-char.lisp |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/code/target-char.lisp b/src/code/target-char.lisp
index 1a932cd..6791452 100644
--- a/src/code/target-char.lisp
+++ b/src/code/target-char.lisp
@@ -799,11 +799,12 @@ character exists."
 (defun normalize-string (string &optional (form :nfd))
   (declare (type (member :nfd :nfkd :nfc :nfkc) form))
   (etypecase string
-    (simple-base-string string)
-    ((simple-array character (*))
+    #!+sb-unicode
+    (base-string string)
+    ((or (array character (*)) #!-sb-unicode base-string)
      (ecase form
        ((:nfd)
         (sort-combiners (decompose-string string)))
        ((:nfkd)
         (sort-combiners (decompose-string string :compatibility)))))
-    ((simple-array nil (*)) string)))
+    ((array nil (*)) string)))
-- 
1.7.10.4