NLS Function: Sets the current language, country, or codepage.
Module: USE DFNLS
Syntax
If you omit codepage, it defaults to NLS$WindowsLanguageCodepage. At program startup, NLS$WindowsEnvironmentCodepage is used to set the codepage.
Results:
The result is of type INTEGER(4). The result is zero if successful. Otherwise, one of the following error codes (defined in DFNLS.F90) may be returned:
NLSSetLocale works on installed locales only. Windows NT (including Windows 2000) and Windows 9* support many locales, but these must be installed through the system Windows NT Control Panel/International menu or the Windows 9* Control Panel/Regional Settings menu.
Note that when doing mixed-language programming with Fortran and C, calling NLSSetLocale with a codepage other than the default environment Windows codepage causes the codepage in the C run-time library to change by calling C's setmbcp( ) routine with the new codepage. Conversely, changing the C run-time library codepage does not change the codepage in the Fortran NLS library.
Calling NLSSetLocale has no effect on the locale used by C programs. The locale set with C's setlocale( ) routine is independent of NLSSetLocale.
Calling NLSSetLocale with the default environment console codepage, NLS$ConsoleEnvironmentCodepage, causes an implicit call to the Win32 API SetFileApisToOEM( ). Calling NLSSetLocale with any other codepage causes a call to SetFileApisToANSI( ).
Compatibility
CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB
See Also: NLSGetLocale