2016-10-08 20:00 GMT+02:00 Ryan Culpepper <ry...@ccs.neu.edu>: > Does one of the `string-normalize-*` functions do what you want? >
No. I am basically implementing the part of the reader that lexes string literals. I want to allow full Racket syntax in the string literals in my infix package. One solution is to use (read (open-input-string lexeme)) but I am afraid that will be slow. The job is therefore to turn "\\ud800\\udc00" into "\ud800\udc00" (the latter a legal string literal). Since (string (integer->char (string->number "d800" 16)) (integer->char (string->number "dc00" 16))) produces the error integer->char: contract violation expected: (and/c (integer-in 0 #x10FFFF) (not/c (integer-in #xD800 #xDFFF))) given: 55296 it is necessary to produce the character directly. /Jens Axel -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.