Informix Error -21000: Invalid byte in codeset conversion input.
Cause and resolution
Invalid byte in codeset conversion input.
Code-set conversion cannot recognize data that is being passed between the server and the client. Check DB_LOCALE and CLIENT_LOCALE settings in your initialization file or your environment.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-21000 fires when code-set conversion can't recognize a byte in data passed between the server and the client — per the official guidance.
- Data containing a byte the current code-set conversion can't recognize, per the official guidance — the direct, only cause.
Solutions / Resolution
- Check the
DB_LOCALEandCLIENT_LOCALEsettings in the initialization file or environment, per the official guidance.
Examples
Checking locale settings
$ env | grep -E 'DB_LOCALE|CLIENT_LOCALE'
Diagnostic Checks
- Check
DB_LOCALEandCLIENT_LOCALE, and confirm they're compatible with the actual data being sent.
Related Errors / Related Topics
- -21001 — "Incomplete character at end of codeset conversion input." A related code-set conversion error, on a truncated multi-byte character rather than an unrecognized byte.
- -21005 — "Inexact character conversion during translation." A related, milder code-set issue — a substitution character was used rather than the conversion failing outright.
Code-set conversion couldn't recognize a byte in the data — check DB_LOCALE/
CLIENT_LOCALE for compatibility.