UTF-8 works just fine with MS SQL: ms:booktest@192.168.1.5=> select N'这是一个'; col0 +----------+ 这是一个 (1 rows) You need to use a "unicode" string, as indicated here using N''. You might be able to change the default behavior in SQL Server to treat strings as unicode strings, by changing the default collation settings (which is latin1 or windows' 1252 encoding or whatever it is). If you're working with a table, when columns are N* column types, it will work fine. -Ken On Tue, Apr 4, 2017 at 4:20 AM, Kenneth Shaw <kenshaw@xxxxxxxxx> wrote: > This doesn't seem to be a problem with PostgreSQL, MySQL, Oracle, or > SQLite3 databases. It was a problem with MSSQL in the limited check > that I just did. I don't see any driver option for the MSSQL Go > driver. I'll poke around and see if there's a "client encoding" > option. > > -Ken > > > On Tue, Apr 4, 2017 at 4:08 AM, Karsten Hilbert <Karsten.Hilbert@xxxxxxx> wrote: >> On Tue, Apr 04, 2017 at 03:48:16AM +0700, Kenneth Shaw wrote: >> >>> It should work. What database did you try that with? I haven't tried >>> to do heavy / extensive utf8 tests, but all of Go (including the >>> "readline" package that is used for capturing input are native utf8. >>> The problem is potentially a connect option in the DSN for the >>> database needs to be manually added >> >> Do you "SET client_encoding" ? >> >> Karsten >> -- >> GPG key ID E4071346 @ eu.pool.sks-keyservers.net >> E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 >> >> >> -- >> Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) >> To make changes to your subscription: >> http://www.postgresql.org/mailpref/pgsql-general -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general