This article explains the most common causes of error "21005 Inexact character conversion during translation", when using Informix database servers.
You receive this error when trying to get data from a remote database, or when trying to load data from a text file to Informix database:
-21005: Inexact character conversion during translation.
One or more characters cannot be mapped from the character code set used by the client or text source, to the character code set used by Informix database.
Resolving The Problem
- The environment variable CLIENT_LOCALE, or DB_LOCALE, are misconfigured on the client side. Make sure that the values of the CLIENT_LOCALE and DB_LOCALE environment variables are set correctly, and that they are compatible. Then rerun the load or query.
- When using files generated with UTF-8 format, ensure you are using the right CLIENT_LOCALE at Informix configuration. CLIENT_LOCALE for United States english, using UTF-8 format is "en_US.UTF8".
- Sometimes the problem comes from the source where data was typed or generated, by example, by using telnet from a DOS windows, instead of using a terminal emulator capable to manage valid UNIX code sets, and typing special characters such accented letters. If this is the case, and there is no a valid LOCALE for the character code set used, you may need to identify the invalid characters and update them manually.
16 June 2018