24.05.2014 Views

AIX Version 4.3 Differences Guide

AIX Version 4.3 Differences Guide

AIX Version 4.3 Differences Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<br />

This presents a bit of a problem since is defined<br />

in all four codesets, is only defined in<br />

ISO8859-7 and UTF-8, and is defined only in<br />

ISO8859-5 and UTF-8. Such a situation could be coded as follows with the<br />

preprocessor directives:<br />

upper /<br />

/<br />

#if defined(ISO88597) || defined(UTF8)<br />

;/<br />

#endif<br />

#if defined(ISO88595) || defined(UTF8)<br />

;<br />

#endif<br />

Using such techniques, it is possible to create a locale definition that tailors itself<br />

to the code set being compiled against while not requiring you to define dummy<br />

codepoints in the charmap. This technique also fulfills the requirement that all<br />

locales for a given country be generated from the same locale source definition,<br />

so that consistency is achieved within a given language/territory combination.<br />

To support Unicode symbol names in charmaps and localedef source files, the<br />

localedef command has been modified to accept symbol names of at least 85<br />

characters instead of the current limit of 32. Currently, the longest symbol name<br />

from the Unicode standard is 83 characters long, not including the required < and<br />

> delimiters. This is a simple modification to symtab.h and has been done without<br />

any impact on performance, as the symbol names are only used during locale<br />

compilation, not at run time.<br />

10.3.3.2 Locale Methods<br />

The current set of locale methods, as provided in libc, was implemented based on<br />

the locales supported in <strong>AIX</strong> <strong>Version</strong> 3.2. Since that time, many new locales have<br />

been added to the system, mostly with corresponding locale-specific methods. It<br />

is a goal of this design to minimize the number of locale-specific method objects<br />

required and also to provide a framework under which future <strong>AIX</strong> locales can be<br />

easily added.<br />

Locale-specific methods that are no longer used will remain in the libc.a library in<br />

order to insure binary compatibility. The following is the set of locale-specific<br />

methods that are provided with <strong>AIX</strong> <strong>Version</strong> <strong>4.3</strong>. These locale methods have been<br />

placed into libi18n.a, instead of libc.a, to minimize incompatibilities with previous<br />

releases.<br />

mblen()<br />

Determine the length (in bytes) of a multi-byte character. This is the<br />

most difficult method to generalize. The following locale-specific<br />

variants are supported:<br />

• __mblen_sb() - For single-byte code sets, always returns 1.<br />

• __mblen_utf() - multi-byte determination rules for UTF-8-based<br />

locales.<br />

National Language Support 245

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!