On Apr 26, 2009, at 7:47 PM, samppi wrote:
user=> \u10000 java.lang.IllegalArgumentException: Invalid unicode character: \u10000How would I embed the character as a literal in my Clojure code?
Java characters are (still) 16 bits wide. A single Java character cannot represent the Unicode character you're looking to represent. Since Clojure characters are Java characters, you'll need to do this the way the Java folks do.
I found a blog post about it here: http://weblogs.java.net/blog/joconner/archive/2004/04/unicode_40_supp.html This is also a good reference: http://www.fileformat.info/info/unicode/char/10000/index.htmThis representation as a string from that page does seem to work in Clojure:
"\ud800\udc00" --Steve
smime.p7s
Description: S/MIME cryptographic signature