Informix Error -21001: Incomplete character at end of codeset conversion input.
Cause and resolution
Incomplete character at end of 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
-21001 fires when code-set conversion input ends mid-character — per the official guidance, a multi-byte character was truncated at the end of the data passed between the server and the client.
- Data truncated in the middle of a multi-byte character, 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 check whether the data was truncated before conversion (e.g. by a buffer size limit).
Related Errors / Related Topics
- -21000 — "Invalid byte in codeset conversion input." A related code-set conversion error, on an unrecognized byte rather than a truncated multi-byte character.
- -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 input ended in the middle of a multi-byte character — check
DB_LOCALE/CLIENT_LOCALE and whether the data was truncated upstream.