Informix Error -492
-492 LANG or LC_COLLATE environment variable invalid.
You specified an invalid value for a LANG or LC_COLLATE environment variable.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-492 is closely related to -491, but here the environment variable is actually set — just to a
value the server doesn't recognize as valid, whether it's LANG or LC_COLLATE.
- A typo or misspelling in the
LANG/LC_COLLATEvalue. - A locale string not supported by the server's NLS configuration, even if it's a valid locale name in general OS terms.
- Confusing the specific value the database's NLS setup requires (per
-491'sstring_valueguidance) with a different, generic system locale value.
Solutions / Resolution
- Verify the exact value expected, per
-490/-491's guidance, for the specific NLS- enabled database being connected to. - Check for typos in the
LANG/LC_COLLATEenvironment variable's current value. - Confirm the locale value is actually supported by the server's NLS configuration, not just valid in general OS terms.
Examples
Checking current environment variable values
echo $LANG
echo $LC_COLLATE
-- compare against the exact value the target NLS-enabled
-- database actually requires
Diagnostic Checks
- Check the current values of
LANGandLC_COLLATE. - Compare against the specific value the target database's NLS configuration requires.
Related Errors / Related Topics
- -491 — "DBNLS not set (LC_COLLATE must be string_value)." The closely related sibling — that error covers a missing/unset variable, while this one covers a set-but-invalid value.
Verify the exact expected locale value for the specific NLS-enabled database being connected to, rather than assuming any generally-valid OS locale string will work.