I can’t seem to figure out how to get the UTF-8 hex code for a character in clojure. The closest I got to a relavent result was by trying (int \Д), but it returned 1044 instead of 0414 or D094. What would I use to get the latter result?
Thanks in advance!
EDIT: I didn’t exactly make it clear, but I need the UTF-8 hex string, so I need D094 rather than 0414. I am going to transform the hex code from D094 to _D0_94 for a label printer (I know it’s kind of icky – I don’t exactly like it myself 😛 )
If you’re just after the constituent bytes:
If you want the stringified code, just convert each byte to its hex representation and concatenate them: