23.2 Globalization Support Environment Variables

Globalization support environment variables are automatically set to default values during Oracle Fusion Middleware installation.


With the environment switching feature, you are not limited to the default environment set at the time of installation, and you can configure multiple environments, including language settings, for a single Reports Server. For more information, refer to Section 7.2.2, "Dynamic Environment Switching".

Table 23-1 lists and describes globalization support-related environment variables that are relevant to Oracle Reports Services.

Table 23-1 Oracle Reports ServicesEnvironment Variables for Globalization Support

Variable Description


Relevant to Oracle Reports Services. The language settings used by Oracle Reports Services. See Section 23.2.1, "NLS_LANG Environment Variable".


The language for Oracle Reports Builder. If not set, then NLS_LANG default values are used. See Section 23.2.2, "DEVELOPER_NLS_LANG and USER_NLS_LANG Environment Variables".


The language for Reports Runtime. If not set, then NLS_LANG default values are used. See Section 23.2.2, "DEVELOPER_NLS_LANG and USER_NLS_LANG Environment Variables".

23.2.1 NLS_LANG Environment Variable

The NLS_LANG environment variable specifies the language, territory, and character set settings to be used by Oracle Reports Services. Specifically:

  • The language for messages displayed to the user

  • The default format masks used for DATE and NUMBER data types

  • The sorting sequence

  • The character set


    This environment variable is set automatically when you install Oracle Fusion Middleware. Refer to Section, "Defining the NLS_LANG Environment Variable" for more information about changing the environment variable after installing Oracle Fusion Middleware.

The syntax for NLS_LANG is:


The values are defined as follows:

  • language

    Specifies the language and its conventions for displaying messages (including error messages) as well as day and month names. If language is not specified, then the value defaults to American. See Section, "Defining the Language and Territory".

  • territory

    Specifies the territory and its conventions for default date format, decimal character used for numbers, currency symbol, and calculation of week and day numbers. If territory is not specified, then the value defaults to America. See Section, "Defining the Language and Territory".

  • charset

    Specifies the character set in which data is displayed. This should be a character set that matches your language and platform. This option also specifies the character set used for displaying messages. See Section, "Defining the Character Set".


    When you use features like Oracle Portal Security, Portal Destination, and Job Status Repository, the JDBC database connections made by Oracle Reports Services may override the initial NLS_LANG setting. This change may in turn affect the behavior of the running report, such as aliasing PDF output in Asian languages. On UNIX platforms, you can work around this issue by using the environment switching functionality to dynamically set the environment for reports, as described in Section 7.2.2, "Dynamic Environment Switching".

Your NLS_LANG setting should take into account regional differences between countries that use (basically) the same language. For example, if you want to run in French (as used in France), then you set the NLS_LANG environment variable:


If you want to run in French, but this time as used in Switzerland, you would set the NLS_LANG environment variable:



The language for the rwservlet pages such as showjobs,showenv, online Help, and error messages are delivered from the middle tier machine's locale (or LANG on UNIX) and not NLS_LANG. For example, if you have set your middle tier locale to French and NLS_LANG=JAPANESE_JAPAN.JA16SJIS, the showjobs or error messages will be displayed in French, not in Japanese. Defining the NLS_LANG Environment Variable

You define the NLS_LANG environment variable in the same way you define other environment variables on your Windows or UNIX operating system. Windows

To define the NLS_LANG environment variable on Windows, do the following:

  1. Open the Windows registry.


    Back up your registry before you edit it.
  2. Expand the HKEY_LOCAL_MACHINE node, then expand the SOFTWARE node.

  3. Expand the Oracle node, then click your Oracle Reports Services HOME node to display the Oracle environment variables in the right panel of the Registry Editor.

  4. Double-click the NLS_LANG environment variable.

  5. Type the new value for NLS_LANG in the Value data text box.

  6. Click OK. UNIX

To define the NLS_LANG environment variable on the UNIX platform, set it in the shell script reports.sh, located in your ORACLE_INSTANCE/config/reports/bin directory. Defining the Language and Territory

While the character set ensures that the individual characters needed for each language are available, support for national conventions provides correct localized display of data items.

The specified language determines the default conventions for the following characteristics:

  • Language for Oracle Reports Services messages and message from the Oracle Database.

  • Language for day and month names and their abbreviations (specified in the SQL functions TO_CHAR and TO_DATE).

  • Symbol equivalents for AM, PM, AD, and BC.

  • Default sorting sequence for character data when ORDER BY is specified (GROUP BY uses a binary sort unless ORDER BY is specified).

  • Writing direction (both right to left and left to right).

For example, if the language is set to French, then the following messages in English are converted to French:

ORA-00942: table or view does not exist
REP-0110: Unable to open file.

ORA-00942: table ou vue inexistante
REP-0110: Impossible d'ouvrir le fichier

The specified territory determines the conventions for the following default date and numeric formatting characteristics:

  • Date format

  • Decimal character and group separator

  • Local currency symbol

  • ISO currency symbol

  • Week start day

  • Credit and debit symbol

  • ISO week flag

  • List separator

For example, if the territory is set to France, then the numbers are formatted using a comma as the decimal character. Defining the Character Set

The character set component of the globalization support environment variables specifies the character set in which data is represented in your environment. When data is transferred from a system using one character set to a system using another character set, it is processed and displayed correctly on the second system, even though some characters might be represented by different binary values in the character sets. Character Set Design Considerations

If you are designing a multilingual application, or even a single-language application that runs with multiple character sets, you must determine the character set most widely used at runtime and then set the NLS_LANG environment variable to that particular character set.

If you design an application in one character set and run it in another character set, performance can suffer. Furthermore, if the runtime character set does not contain all the characters in the design-time character set, then question marks appear in place of the unrecognized characters. Font Aliasing Considerations

There may be situations where you create a multilingual application with a specific font but find that a different font is being used when you run that application. You would most likely encounter this when using an English font (such as MS Sans Serif or Arial) in environments other than Western European. This occurs because Oracle Reports Services checks to see if the character set associated with the font matches the character set specified by the language environment variable. If the two do not match, Oracle Reports Services automatically substitutes the font with another font whose associated character set matches the character set specified by the language environment variable. This automatic substitution assures that the data being returned from the database gets displayed correctly in the application.


If you enter local characters using an English font, then Windows does an implicit association with another font.

There might be cases, however, where you do not want this substitution to take place. You can avoid this substitution by mapping all desired fonts to the WE8ISO8859P1 character set in the font alias file (uifont.ali). For example, if you are unable to use the Arial font in your application, you can add the following line to your font alias file:


This example specifies that any Arial font should be mapped to the same value, but with the WE8ISO8859P1 character set.

For more information about font aliasing and uifont.ali, see Section, "Font Aliasing".

23.2.2 DEVELOPER_NLS_LANG and USER_NLS_LANG Environment Variables

If you must use two sets of resource and message files at the same time, then two other language environment variables are available. These can be used after Oracle Fusion Middleware installation is completed.



The syntax for DEVELOPER_NLS_LANG and USER_NLS_LANG is the same as for the NLS_LANG environment variable. That is:


If these environment variables are not specifically set, then NLS_LANG default values will be used. Use the DEVELOPER_NLS_LANG and USER_NLS_LANG environment variables in lieu of the NLS_LANG environment variable in the following situations:

  • You prefer to use Reports Builder in a particular language (for example, English), but you are developing an application for another language. DEVELOPER_NLS_LANG and USER_NLS_LANG environment variables allow you to use different language settings for the Oracle Reports Builder and Reports Runtime.

  • You are creating an application to run in a language for which a local language version of Oracle Reports Builder is not currently available.