Thanks, I can work with that. /Jens Axel
2016-10-08 19:44 GMT+02:00 Jon Zeppieri <[email protected]>: > > > On Sat, Oct 8, 2016 at 1:06 PM, Jens Axel Søgaard <[email protected]> > wrote: > >> Hi All, >> >> The following interaction shows how the reader can be used to construct a >> surrogate character: >> >> > (string-ref "\ud800\udc00" 0) >> #\𐀀 >> >> Given the two hexadecimal numbers d800 and dc00 how do I >> construct the surrogate character directly? >> >> /Jens Axel >> >> > I think you have to do the arithmetic yourself. Something like: > > (define (utf-16-surrogate-pair->char hi lo) > (integer->char > (+ #x10000 > (arithmetic-shift (bitwise-and hi #x03ff) 10) > (bitwise-and lo #x03ff)))) > > > > -- -- Jens Axel Søgaard -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.

