Character Sets and Collations of the Client Connection
When data containing character set attributes is transmitted between the server and client, coding conversion is automatically performed. After receiving an SQL statement from a client, the server converts the character set of the SQL statement from the client character set client_encoding to the database character set server_encoding. Before the query result data is sent to the client, the data is encoded and converted to the character_set_results character set of the client.
System parameters are described as follows:
- server_encoding
Character set specified when an M-compatible database is created. For details, see Creating an M-compatible Database and User.
- client_encoding
Character set of the client. You can run the SET NAMES statement to change the value. For details, see SET.
- character_set_connection
Default character set applied when no character set is specified for character string constants in SQL statements.
- collation_connection
Default collation applied when no collation is specified for character string constants in SQL statements.
- character_set_results
Character set of the returned result.
-
For an expression that converts a non-character type object to a character type, the result character set and collation are character_set_connection and collation_connection.
-
By default, the character set and collation of a bound parameter of the character type are the values of character_set_connection and collation_connection, respectively.
-
During character data conversion, the character code is verified. If the character code does not meet the requirements, the "invalid byte sequence for encoding xxx" error is reported.
-
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot