Your Question
How to set charset (encoding) for a new PostgreSQL database?
The document you expected this should be explained
https://gorm.io/de_DE/docs/connecting_to_the_database.html
Expected answer
Comment From: github-actions[bot]
This issue has been automatically marked as stale because it has been open 360 days with no activity. Remove stale label or comment or this will be closed in 180 days
Comment From: saeidee
You may try this:
go
dsn := "host=localhost user=gorm password=gorm dbname=gorm port=9920 sslmode=disable TimeZone=Asia/Shanghai options='--client_encoding=UTF8'"