I am running an executable from Go via os.Exec, which gives me the following output: (\\xe2\\x96\\xb2)
. The output contains a UTF-8 byte string, which I want to convert to the corresponding Unicode codepoint (U+25B2). What I am expecting to see, or trying to convert to is: "(▲)".
I have looked at this entry in the Go Blog (https://blog.golang.org/strings), but it starts out with an Interpreted string literal, whereas the command output seems to be a Raw string literal. I have tried strconv.Quote
and strconv.Unquote
, which does not achieve what I'm looking for.