Informix Error -21005: Inexact character conversion during translation.
Cause and resolution
Inexact character conversion during translation.
One or more characters were translated using a substitution character. Translation in the reverse direction would not produce the original string. Make sure that the values of the CLIENT_LOCALE and DB_LOCALE environment variables are compatible.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-21005 fires when one or more characters were translated using a substitution character — per the official guidance, reverse translation of the substituted string wouldn't reproduce the original.
CLIENT_LOCALEandDB_LOCALEvalues that aren't compatible with each other, per the official guidance — the direct, only cause.
Solutions / Resolution
- Make sure
CLIENT_LOCALEandDB_LOCALEare compatible, per the official guidance.
Examples
Checking locale settings
$ env | grep -E 'DB_LOCALE|CLIENT_LOCALE'
Diagnostic Checks
- Check
CLIENT_LOCALEandDB_LOCALE, and confirm both cover the character set actually in use.
Related Errors / Related Topics
- -21000 — "Invalid byte in codeset conversion input." A related, more severe code-set conversion error — an unrecognized byte, rather than a lossy but successful substitution.
- -21001 — "Incomplete character at end of codeset conversion input." A related, more severe code-set conversion error — a truncated multi-byte character, rather than a lossy but successful substitution.
One or more characters were translated using a substitution character, losing information —
confirm CLIENT_LOCALE/DB_LOCALE are compatible.