]>
git.saurik.com Git - apple/icu.git/blob - icuSources/common/ucnv_io.h
2 **********************************************************************
3 * Copyright (C) 1999-2003, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 **********************************************************************
9 * defines variables and functions pertaining to file access, and name resolution
10 * aspect of the library
16 #include "unicode/utypes.h"
18 #define UCNV_AMBIGUOUS_ALIAS_MAP_BIT 0x8000
19 #define UCNV_CONVERTER_INDEX_MASK 0xFFF
20 #define UCNV_NUM_RESERVED_TAGS 2
21 #define UCNV_NUM_HIDDEN_TAGS 1
24 * Remove the underscores, dashes and spaces from the name, and convert
25 * the name to lower case.
26 * @param dst The destination buffer, which is <= the buffer of name.
27 * @param dst The destination buffer, which is <= the buffer of name.
28 * @return the destination buffer.
30 U_CFUNC
char * U_EXPORT2
31 ucnv_io_stripForCompare(char *dst
, const char *name
);
34 * Map a converter alias name to a canonical converter name.
35 * The alias is searched for case-insensitively, the converter name
36 * is returned in mixed-case.
37 * Returns NULL if the alias is not found.
38 * @param alias The alias name to be searched.
39 * @param pErrorCode The error code
40 * @return the converter name in mixed-case, return NULL if the alias is not found.
43 ucnv_io_getConverterName(const char *alias
, UErrorCode
*pErrorCode
);
46 * The count for ucnv_io_getAliases and ucnv_io_getAlias
47 * @param alias The alias name to be counted
48 * @param pErrorCode The error code
49 * @return the alias count
52 ucnv_io_countAliases(const char *alias
, UErrorCode
*pErrorCode
);
55 * Search case-insensitively for a converter alias and set aliases to
56 * a pointer to the list of aliases for the actual converter.
57 * The first "alias" is the canonical converter name.
58 * The aliases are stored consecutively, in mixed case, each NUL-terminated.
59 * There are as many strings in this list as the return value specifies.
60 * Returns the number of aliases including the canonical converter name,
61 * or 0 if the alias is not found.
62 * @param alias The canonical converter name
64 * @param aliases A pointer to the list of aliases for the actual converter
65 * @return the number of aliases including the canonical converter name, or 0 if the alias is not found.
68 ucnv_io_getAliases(const char *alias
, uint16_t start
, const char **aliases
, UErrorCode
*pErrorCode
);
71 * Search case-insensitively for a converter alias and return
73 * Returns NULL if the alias is not found.
74 * @param alias The converter alias
75 * @param n The number specifies which alias to get
76 * @param pErrorCode The error code
77 * @return the (n)th alias and return NULL if the alias is not found.
80 ucnv_io_getAlias(const char *alias
, uint16_t n
, UErrorCode
*pErrorCode
);
83 * Return the number of all standard names.
84 * @param pErrorCode The error code
85 * @return the number of all standard names
88 ucnv_io_countStandards(UErrorCode
*pErrorCode
);
91 * Return the number of all converter names.
92 * @param pErrorCode The error code
93 * @return the number of all converter names
96 ucnv_io_countAvailableConverters(UErrorCode
*pErrorCode
);
99 * Return the (n)th converter name in mixed case, or NULL
100 * if there is none (typically, if the data cannot be loaded).
101 * 0<=index<ucnv_io_countAvailableConverters().
102 * @param n The number specifies which converter name to get
103 * @param pErrorCode The error code
104 * @return the (n)th converter name in mixed case, or NULL if there is none.
107 ucnv_io_getAvailableConverter(uint16_t n
, UErrorCode
*pErrorCode
);
110 * Return the (n)th converter name in mixed case, or NULL
111 * if there is none (typically, if the data cannot be loaded).
112 * 0<=index<ucnv_io_countAvailableConverters().
115 ucnv_io_flushAvailableConverterCache(void);
118 * Return the number of all aliases (and converter names).
119 * @param pErrorCode The error code
120 * @return the number of all aliases
123 ucnv_io_countAvailableAliases(UErrorCode
*pErrorCode
);
126 * Get the name of the default converter.
127 * This name is already resolved by <code>ucnv_io_getConverterName()</code>.
128 * @return the name of the default converter
131 ucnv_io_getDefaultConverterName(void);
134 * Set the name of the default converter.
135 * @param name The name set to the default converter
138 ucnv_io_setDefaultConverterName(const char *name
);
140 #endif /* _UCNV_IO */
143 * Hey, Emacs, please set the following:
146 * indent-tabs-mode: nil