# E.5 National Language Support Routines (WNT, W9*)

National Language Support (NLS) routines provide language localization and a multibyte character set (MBCS) to let you write applications in different languages. To use an NLS routine, add the following statement to the program unit containing the routine:

  USE DFNLS

Table E-5 summarizes the NLS routines. Routine names are shown in mixed case to make the names easier to understand. When writing your applications, you can use any case.

Table E-5 Summary of NLS Routines (WNT, W9*)

Name | Description
--- | ---
Locale Setting and Inquiry Routines
NLSEnumCodepages | Returns all the supported codepages on the system.
NLSEnumLocales | Returns all the languages and country combinations supported by the system.
NLSGetEnvironmentCodepage | Returns the codepage number for the system (Window) codepage or the console codepage.
NLSGetLocale | Returns the current language, country, and codepage.
NLSGetLocaleInfo | Returns requested information about the current local code set.
NLSSetEnvironmentCodepage | Changes the codepage for the current console.
NLSSetLocale | Sets the language, country, and codepage.
Formatting Routines
NLSFormatCurrency | Formats a number string and returns the correct currency string for the current locale.
NLSFormatDate | Returns a correctly formatted string containing the date for the current locale.
NLSFormatNumber | Formats a number string and returns the correct number string for the current locale.
NLSFormatTime | Returns a correctly formatted string containing the time for the current locale.
MBCS Inquiry Routines
MBCharLen | Returns the length of the first multibyte character in a string.
MBCurMax | Returns the longest possible multibyte character for the current codepage.
MBLead | Determines whether a given character is the first byte of a multibyte character.
MBLen | Returns the number of multibyte characters in a string, including trailing spaces.
MBLen_Trim | Returns the number of multibyte characters in a string, not including trailing spaces.
MBNext | Returns the string position of the first byte of the multibyte character immediately after the given string position.
MBPrev | Returns the string position of the first byte of the multibyte character immediately before the given string position.
MBStrLead | Performs a context sensitive test to determine whether a given byte in a character string is a lead byte.
MBCS Conversion Routines
MBConvertMBToUnicode | Converts a character string from a multibyte codepage to a Unicode string.
MBConvertUnicodeToMB | Converts a Unicode string to a multibyte character string of the current codepage.
MBJISTToJMS | Converts a Japan Industry Standard (JIS) character to a Microsoft Kanji (Shift JIS or JMS) character.
MBJMSTToJIS | Converts a Microsoft Kanji (Shift JIS or JMS) character to a Japan Industry Standard (JIS) character.
MBCS Fortran Equivalent Routines
MBINCHARQQ | Same as INCHARQQ except that it can read a single multibyte character at once and returns the number of bytes read.
MBINDEX | Same as INDEX except that multibyte characters can be included in its arguments.
MBLGE, MBLGT, MBLLE, MBLLT, MBLEQ, MBLNE | Same as LGE, LGT, LLE, LLT, and the operators .EQ. and .NE. except that multibyte characters can be included in their arguments.
MBSCAN | Same as SCAN except that multibyte characters can be included in its arguments.
MBVERIFY | Same as VERIFY except that multibyte characters can be included in its arguments.

For more information on these routines, see the Compaq Visual Fortran online Reference.

Previous Page Next Page Table of Contents