If you run fmt.Println(\"\\u554a\"), it shows \'啊\'.
fmt.Println(\"\\u554a\")
But how to get unicode-style-string \\u554a from a rune \'啊\' ?
\\u554a
For example,
package main import "fmt" func main() { r := rune('啊') u := fmt.Sprintf("%U", r) fmt.Println(string(r), u) }
Output:
啊 U+554A