Informix Error -494
-494 LANG or LC_CTYPE environment variable invalid.
You specified an invalid value for a LANG or LC_CTYPE environment variable.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-494 is the LC_CTYPE counterpart of -492: the variable is set, but to a value the server
doesn't recognize as valid, whether it's LANG or LC_CTYPE.
- A typo or misspelling in the
LANG/LC_CTYPEvalue. - A locale string not supported by the server's NLS configuration, even if it's a valid locale name in general OS terms.
LC_COLLATEcorrectly configured (avoiding-492) butLC_CTYPEoverlooked or mismatched.
Solutions / Resolution
- Verify the exact value expected, per
-493's guidance, for the specific NLS-enabled database being connected to. - Check for typos in the
LANG/LC_CTYPEenvironment variable's current value. - Check both
LC_COLLATEandLC_CTYPEtogether, since they're configured independently and fixing one doesn't guarantee the other is correct.
Examples
Checking current environment variable values
echo $LANG
echo $LC_CTYPE
-- compare against the exact value the target NLS-enabled
-- database actually requires
Diagnostic Checks
- Check the current values of
LANGandLC_CTYPE. - Compare against the specific value the target database's NLS configuration requires.
Related Errors / Related Topics
- -493 — "DBNLS not set (LC_CTYPE must be string_value)." The closely related sibling — that error covers a missing/unset variable, while this one covers a set-but-invalid value.
- -492 — "LANG or LC_COLLATE environment variable invalid." The identical underlying issue,
for
LC_COLLATEinstead ofLC_CTYPE.
Same diagnostic approach as -492 — verify the exact expected locale value for the specific
NLS-enabled database, rather than assuming a generic OS locale string will work.