ICU4C Proposal: ulocmisc API
"Ram Viswanadha" <[email protected]>
| Newsgroups | gmane.comp.lib.icu.general |
|---|---|
| Message-ID | <[email protected]> |
Motivation: The locale data included in ICU contains data that cannot be
accessed through the locale interface. These APIs provide a mechanism for
the clients to access the previously inaccessible data.
Expires : 5th Nov 2003
/**
* Fills the set with the set of exemplar characters for the locale and
* returns the set.
*
* @param fillIn A pointer to USet object to be filled in with the
* exemplar characters set for the locale.
* <em> If NULL is passed, then a new USet will be created
and returned.
* The caller owns this object and must dispose it by
calling uset_close.
* </em>
* @param localeID The id of the locale for which the exemplar character
set
* needs to be retrieved.
* @param status Must be a valid pointer to an error code value,
* which must not indicate a failure before the function
call.
* @return USet* The pointer to the fillIn USet object.
* @draft ICU 2.8
*/
U_CAPI USet* U_EXPORT2
ulocmisc_getExemplarSet(USet *fillIn, const char *localeID, UErrorCode
*status);
/**
* @draft ICU 2.8
*/
typedef enum UMeasurementSystem UMeasurementSystem;
/**
* Enumeration for representing the measurement systems.
* @draft ICU 2.8
*/
enum UMeasurementSystem {
UMS_US, /** Measurement system followed in the United States of
America. */
UMS_SI, /** Measurement system specified by SI otherwise known as
Metric system. */
UMS_LIMIT
};
/**
* Returns the measurement system used in the locale specified by the
localeID.
*
* @param localeID The id of the locale for which the measurement
system to be retrieved.
* @param status Must be a valid pointer to an error code value,
* which must not indicate a failure before the
function call.
* @return UMeasurementSystem the measurement system used in the locale.
* @draft ICU 2.8
*/
U_CAPI UMeasurementSystem U_EXPORT2
ulocmisc_getMeasurementSystem(const char *localeID, UErrorCode *status);
/**
* Returns the element gives the normal business letter size, and customary
units.
* The units for the numbers are always in <em>millimeters</em>.
*
* @param localeID The id of the locale for which the paper size
information to be retrieved.
* @param height A pointer to int to recieve the height information.
* @param width A pointer to int to recieve the width information.
* @param status Must be a valid pointer to an error code value,
* which must not indicate a failure before the
function call.
* @draft ICU 2.8
*/
U_CAPI void U_EXPORT2
ulocmisc_getPaperSize(const char *localeID, int *height, int *width,
UErrorCode *status);