将非ascii表单值另存为问号

I'm using Go sqlx package to make queries on MariaDB database and I'd like to be able to save non-ascii form submitted values into the database.

Here is the function:

func QuoteCreate(content string, author string) error {
    var err error
    fmt.Println("content, author", content, author)

        _, err = database.SQL.Exec("INSERT INTO quote (content, author) VALUES (?,?)", content, author)

        if err != nil {
        fmt.Println(err)
    }
    return standardizeError(err)
}

The quote tables has utf8_general_cli colation and InnoDB engine. However the content and author values submitted by form are saved as ??? when the values are not ascii characters (I tried Persian and simplified chinese).

I have also tried utf8_unicode_cli for the table colation, but got the same problem. Interestingly, non-ascii characters are shown correctly when printed on terminal befor being saved.

So I'm left clueless what's wrong here and how can I fix it?

I don't know why but these solved the issue:

ALTER DATABASE mydb CHARACTER SET utf8 COLLATE utf8_unicode_ci;
ALTER TABLE quote CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;