on_charset_conversion_failure option [database]

Controls what happens if an error is encountered during character conversion.

Allowed values

Ignore, Warning, Error

Default

Ignore

Remarks

Controls what happens if an error is encountered during character conversion, as follows:

  • Ignore   Errors and warnings do not appear.

  • Warning   Reports substitutions and illegal characters as warnings. Illegal characters are not translated.

  • Error   Reports substitutions and illegal characters as errors.

When character set conversion is required between the client and the database, this option governs whether to ignore, return a warning, or return an error, when illegal characters are detected, or when character substitution is used.

Single-byte to single-byte converters are not able to report substitutions and illegal characters, and must be set to Ignore.

This option does not control the behavior when lossy conversion takes place on the client. For example, SQL statements from the client must be in, or converted to, the CHAR database character set. Suppose a Unicode client application prepares a SQL statement, and that statement contains characters that cannot be represented in the CHAR database character set. Substitution characters are used instead. However, because the lossy conversion took place on the client, the database server is unaware of the lossy conversion.

See also