TeslaCN commented on issue #13576:
URL:
https://github.com/apache/shardingsphere/issues/13576#issuecomment-967072960
Hi @penghuazhou
I found a way that adding `client_encoding=UTF8` to DSN and it worked:
```go
package main
import (
"gorm.io/driver/postgres"
"gorm.io/gorm"
)
func main() {
dsn := "host=localhost user=postgres password=postgres dbname=postgres
port=5432 sslmode=disable TimeZone=Asia/Shanghai client_encoding=UTF8"
_, _ = gorm.Open(postgres.Open(dsn), &gorm.Config{})
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]