String is stored in database as unicode "\u0435\u043e ..." (table's encoding is UTF-8).
After selecting from database and printing:
log.Println(str)
OUT: \u0435\u043e...
How can I transform this string to utf presentation?
String is stored in database as unicode "\u0435\u043e ..." (table's encoding is UTF-8).
After selecting from database and printing:
log.Println(str)
OUT: \u0435\u043e...
How can I transform this string to utf presentation?
收起
当前问题酬金
¥ 0 (可追加 ¥500)
支付方式
扫码支付
To decode the string you have, you can do:
import "net/url"
...
url.QueryUnescape("\u0435\u043e")
But I think there's a misconfiguration of your database or connection parameters, as this should be handled automatically. This is not utf-8 BTW.
报告相同问题?