I have a Text object that contains some number of Latin characters that needs to be converted to a unicode escape sequence of the format \u#### with # being hex digits
As described here, haskell easily converts strings to escape sequences and vice versa. However, it will only go to the decimal representation. For example,
> let s = "Ñ"
> s
"\209"
Is there a way to specify the escape sequence encoding to force it to spit out in the correct format? i.e
> let s = encodeUnicode16 "Ñ"
> s
"\u00d1"
Text -> Textthat 2) you are assuming will only be passed a value containingData.Char.isLatin1matchingChars in order to 3) replacenot . Data.Char.isAsciiChars withTextstrings containing thatChar's c-style four digit form backslash-u encoding representation? E.g.,f "El Niño" = "El Ni\\u00f1o", nb the escaped backslash.