Ask the Expert

Converting nls_lang format

I want to convert the nls_lang from american_america.us7ascii to french_france.utf8. Is this possible?

    Requires Free Membership to View

You can make NLS_LANG anything you wish as it is simply an environment variable.

The following examples show how date and number formats are affected by NLS_LANG.

% setenv NLS_LANG American_America.WE8ISO8859P1
SQL> SELECT ename, hiredate, ROUND(sal/12,2) sal FROM emp;

ENAME HIREDATE SAL
Clark 09-DEC-88 4195.83
Miller 23-MAR-92 4366.67
Strauß 01-APR-95 3795.87

If NLS_LANG is set with the language as French, the territory as France, and the character set as Western European 8-bit ISO 8859-1, the same query returns:

% setenv NLS_LANG French_France.WE8ISO8859P1
SQL> SELECT ename, hiredate, ROUND(sal/12,2) sal FROM emp;

ENAME HIREDATE SAL
Clark 09/12/88 4195,83
Miller 23/03/92 4366,67
Strauß 01/04/95 3795,87

You didn't mention if this is strictly an NLS_LANG setting or a character set issue. If you're wanting to change the characterset of your data that's really another issue. The character set of your database is one thing and the display via NLS_LANG is another.

This was first published in January 2004

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: