Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
HP.com home

HP OpenVMS Systems

» 

HP OpenVMS Systems

OpenVMS information

» What's new on our site
» Upcoming events
» Configuration and buying assistance
» Send us your comments

HP OpenVMS systems

» OpenVMS software
» Supported Servers
» OpenVMS virtualization
» OpenVMS solutions and partners
» OpenVMS success stories
» OpenVMS service and support
» OpenVMS resources and information
» OpenVMS documentation
» Education and training

OpenVMS software

» Operating system
» OpenVMS clusters
» OpenVMS Galaxy
» e-Business products
» Opensource tools
» Networking
» System management
» Storage management
» Security products
» Application development and integration
» Software licensing
» SPD listings
» Whitepapers
» Ask the wizard
» Training
» OpenVMS books

Evolving business value

» Business Systems Evolution
» AlphaServer systems transition planning
» Alpha RetainTrust program

Related links

» HP Integrity servers
» HP Alpha systems
» HP storage
» HP software
» HP products and services
» HP solutions
» HP support
disaster proof
HP Integrity server animation
Content starts here
DEC C RTL Euro I18N components kits

This web page provides information about the DEC C Run-Time Library (CRTL) Euro I18N Components kits.

Purpose of Euro I18N Components

Euro I18N Components (referred to here as EuroI18N) is an addition to the OpenVMS I18N infrastucture that facilitates use of the Euro currency sign by DEC C and DEC C++ applications.

EuroI18N is designed for DEC C and DEC C++ applications that are based on the X/Open internationalization model used at run-time to retrieve national and international currency symbols from the current program's locale using C Run-Time Library functions.

EuroI18N is provided to ease conversion to the Euro currency sign for applications that use locales based on the ISO8859-1 (Latin-1) character set, the character set commonly used by countries affected by Euro.

COMPAQ Proprietary Character Set ISO8859-1-Euro

The following two standard character sets include the Euro sign:

  • ISO8859-15 (Latin 1)
  • Unicode

ISO8859-15 is similar to ISO8859-1 except that it interprets the 0xa4 codepoint as the Euro sign and redefines a number of other characters. If an application based on ISO8859-1 switches to using ISO8859-15, this change can result in different behavior, not only for the currency sign, which is expected, but also for the other redefined characters.

To avert potential problems that could be induced by these other redefined characters, COMPAQ introduced a proprietary character set called ISO8859-1-Euro. ISO8859-1-Euro is identical to ISO8859-1 except that the 0xa4 codepoint represents the Euro sign. Since ISO8859-1-Euro and ISO8859-1 differ only in the 0xa4 codepoint, ISO8859-1-based applications should encounter no problems when using the ISO8859-1-Euro codeset.

Concept of Euro Locale

Applications following the X/Open internationalization model select character sets through locales. Each locale is based on a particular character set.

Starting with OpenVMS Version 6.2, the following locales, based on the ISO8859-1 character set, are shipped in VMSI18N0nn kits (where nn indicates the version of OpenVMS):

  • DA_DK_ISO8859-1 (Danish)
  • DE_CH_ISO8859-1 (Swiss German)
  • DE_DE_ISO8859-1 (German)
  • EN_GB_ISO8859-1 (Great Britain)
  • EN_US_ISO8859-1 (U.S.A)
  • ES_ES_ISO8859-1 (Spanish)
  • FI_FI_ISO8859-1 (Finnish)
  • FR_BE_ISO8859-1 (Belgian French)
  • FR_CA_ISO8859-1 (Canadian French)
  • FR_CH_ISO8859-1 (Swiss French)
  • FR_FR_ISO8859-1 (French)
  • IS_IS_ISO8859-1 (Icelandic)
  • IT_IT_ISO8859-1 (Italian)
  • NL_BE_ISO8859-1 (Belgian Dutch)
  • NL_NL_ISO8859-1 (Dutch)
  • NO_NO_ISO8859-1 (Norwegian)
  • PT_PT_ISO8859-1 (Portuguese)
  • SV_SE_ISO8859-1 (Swedish)

What EuroI18N adds to the OpenVMS I18N infrastructure is a "shadow" set of locales based on the ISO8859-1-Euro character set. Locales based on the ISO8859-1-Euro character set are here referred to as Euro locales. For each ISO8859-1-based locale, EuroI18N adds a corresponding Euro locale. The Euro locale names are based on the locales listed above, with the addition of -EURO on the end. For example, the Danish Euro locale is named DA-DK_ISO8859-1-EURO.

The difference between a "non-Euro" locale and its Euro counterpart is not just the character set on which the locale is based. Euro and "non-Euro" locales also provide different definitions for the 'currency_symbol' and 'int_curr_symbol' locale entities. A "non-Euro" locale defines currency and international currency symbols in a country-specific manner, while all Euro locales define the currency symbol to be the Euro sign and define the international currency symbol as the "EUR" string. For example, the EN_GB_ISO8859-1 locale contains the following definitions:


##############
LC_MONETARY
##############
int_curr_symbol  "GBP "
currency_symbol  "£"

In contrast, the EN_GB_ISO8859-1-EURO counterpart uses these definitions:


##############
LC_MONETARY
##############
int_curr_symbol  "EUR "
currency_symbol  "<euro-currency-sign>"

Using Euro Locales

To switch to using the Euro sign, an application that uses the strfmon() C Run-Time Library function for monetary values simply needs to set the appropriate Euro locale, as shown in the following series of examples:

Code for sample application TEST.C:


#include <locale.h>
#include <monetary.h>
#include <stdio.h>

main()
{
  char buffer[80];
  ssize_t res;
  double amount = 1.0; /* one Euro */

  /*
  ** set locale according to the setting
  ** of the environment variables
  */

  if ( setlocale(LC_ALL,"" ) == NULL )
     perror("cannot set locale");

  /*
  ** call strfmon using the %i format specifier
  ** to get international currency symbol
  */
  res = strfmon(buffer, sizeof(buffer), "%i", amount);
  if ( res == -1 )
      perror("strfmon failed");
  else
     printf("output from strfmon: '%s'\n", buffer);
}

Output when TEST.C is run using EN_GB_ISO8859-1 locale:


$ define/nolog lang EN_GB_ISO8859-1
$ run test
output from strfmon: '+GBP 1.00'

Output when TEST.C is run using EN_GB_ISO8859-1-EURO locale:


$ define/nolog lang EN_GB_ISO8859-1-EURO
$ run test
output from strfmon: '+EUR 1.00'

Note that strfmon() is not the only function to retrieve the currency symbol from the current program's locale. The nl_langinfo(CRNCYSTR) function can also be used to obtain a locale-specific currency symbol. Also, the LOCALE SHOW command can be used to display information about a particular locale, as shown in the following example:


$ define/nolog lang FR_FR_ISO8859-1
$ locale show value int_curr_symbol
"FRF "
$ define/nolog lang FR_FR_ISO8859-1-EURO
$ locale show value int_curr_symbol
"EUR "
$

Euro Locales Provided By EuroI18N

EuroI18N provides a Euro locale for each ISO8859-1-based locale. EuroI18N provides binary locale files as well as locale source files (.lsrc files) and ISO8859-1-EURO.CMAP character set description files (also known as cmap files). If a Euro locale must be customized, the locale source file can be modified and the new binary locale file can be created using the LOCALE COMPILE utility. See the DEC C Run-Time Library Utilities Reference Manual for the format of the locale source file and a description of the LOCALE COMPILE utility. In the future, COMPAQ plans to add Unicode-based Euro locales and locales based on the ISO8859-15 character set.

New EuroI18N Codeset Converters

EuroI18N provides Unicode codeset converters for both the proprietary ISO8859-1-EURO character set and the standard ISO8859-15 character set. These codeset converters facilitate data exchange between OpenVMS systems and systems using Unicode-based and ISO8859-15-based solutions for the Euro. The codeset converters convert data coded in ISO8859-1-EURO and ISO8859-15 character sets to or from any version of Unicode encoding supported by OpenVMS.

The codeset converters can be used by the DEC C Run-Time Library functions from the iconv family of functions as well as by the ICONV CONVERT utility. (See the DEC C Run-Time Library Utilities Reference Manual for information on the ICONV CONVERT utility.)

Distribution of Euro I18N Components

Support for Euro character -- the Euro locales and Unicode codeset converters for ISO8859-1-EURO codeset -- has been incorporated in the base I18N kit for OpenVMS V7.2. In other words, beginning with OpenVMS V7.2, no ECO kits are needed to get the CRTL support for Euro character, the customer should just install the base I18N kit which is shipped on the same media that the VMS system itself.

The name of the CRTL I18N kit has a form of VMSI18Nnnn where nnn is VMS version. VMSI18N072 (for VMS V7.2) and VMSI18N073 (for VMS V7.3) kits include all Euro components

Version Platform Kit Name
OpenVMS Version 7.1 VAX VAXVMSI18N01_071.A
  Alpha ALPVMSI18N01_071.A
OpenVMS Version 6.2 VAX VAXVMSI18N01_062.A
  Alpha ALPVMSI18N01_062.A

No DEC C RTL kit is necessary for OpenVMS Version 5.5-2.

You can access these public kits from the Compaq Services web site.

» services web site

Just search for the kits by name. Precede the name with a plus sign (+) to simplify the search results; for example, +ALPVMSI18N**.

You can also locate the kits using this path:

  • Click on "browse patch tree" in the left margin.
  • Click on public/.
  • Click on vms/.
  • Click on axp/ or vax/.
  • Click on the appropriate version number.
  • Select a DEC C RTL kit.

» Return to OpenVMS Euro Support home page

 

** About PDF files: The PDF files on this Web site can be read online or printed using Adobe® Acrobat® Reader. If you do not have this software installed on your system, you may download it from the Adobe Web site.
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2009 Hewlett-Packard Development Company, L.P.