Re: Should exemplar character set be case-insensitive? (PR#3746)

Alan Liu <[email protected]> Mon, 17 May 2004 14:09:54 -0400 (EDT)
Newsgroups gmane.comp.lib.icu.general
Message-ID <[email protected]>
Proposed change in API for 3.0.  The 'options' parameter is new to 3.0.

See http://www.jtcsv.com/cgibin/icu-bugs?findid=3746

/**
 * Returns the set of exemplar characters for a locale.
 *
 * @param fillIn    Pointer to a USet object to receive the 
 *                  exemplar character set for the given locale.  Previous
 *                  contents of fillIn are lost.  <em>If fillIn is NULL,
 *                  then a new USet is created and returned.  The caller
 *                  owns the result and must dispose of it by calling
 *                  uset_close.</em>
 * @param localeID  Locale id for which the exemplar character set
 *                  is to be retrieved.
 * @param options   Bitmask for options to apply to the exemplar pattern.
 *                  For example, specify USET_CASE_INSENSITIVE to retrieve
 *                  a case-folded exemplar set.  See uset_applyPattern and
 *                  uset_openPatternOptions for a list of valid options.
 *                  The USET_IGNORE_SPACE bit is always set, regardless of
 *                  the value of 'options'.
 * @param status    Pointer to an input-output error code value;
 *                  must not be NULL.
 * @return USet*    Either fillIn, or if fillIn is NULL, a pointer to
 *                  a newly-allocated USet that the user must close.
 * @draft ICU 3.0
 */
U_DRAFT USet* U_EXPORT2 
ulocdata_getExemplarSet(USet *fillIn, const char *localeID,
                        uint32_t options, UErrorCode *status);

In com.ibm.icu.util.LocaleData:

    /**
     * Returns the set of exemplar characters for a locale.
     *
     * @param locale    Locale for which the exemplar character set
     *                  is to be retrieved.
     * @param options   Bitmask for options to apply to the exemplar pattern.
     *                  Valid options are UnicodeSet.IGNORE_SPACE and
     *                  UnicodeSet.CASE.  See
     *                  {@link UnicodeSet#applyPattern(String, int)}
     *                  The IGNORE_SPACE bit is always set, regardless of
     *                  the value of 'options'.
     * @return          The set of exemplar characters for the given locale.
     * @draft ICU 3.0
     */
    public static UnicodeSet getExemplarSet(ULocale locale, int options) {