 
           js/Number
           (let [c (char x)]
-            (if (and (not @capped) (is-letter? c))
+            (if (and (not @capped) (gstring/isUnicodeChar c))
               (do
                 (reset! capped true)
                 (-write writer (string/upper-case c)))

          ;;TODO need to enforce integers only?
          (-write writer (string/upper-case (char c))))))))

;;TODO: This is an oversimplied version. Needs to be fully implemented
(defn- is-letter? [s]
  (boolean
    (#{"A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S" "T" "U" "V" "W" "X" "Y" "Z"
       "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z"}
      s)))

(defn- capitalize-string
  "Capitalizes the words in a string. If first? is false, don't capitalize the
                                      first character of the string even if it's a letter."
  [s first?]
  (let [f (first s)
        s (if (and first? f (is-letter? f))
            (str (string/upper-case f) (subs s 1))
            s)]
    (apply str

                               defdirectives formatter-out]])
  (:require
    [cljs.core :refer [IWriter IDeref]]
    [clojure.string :as string]
    [goog.string :as gstring])
  (:import [goog.string StringBuffer]))

(def ^:dynamic *out* nil)
