2
**********************************************************************
3
* Copyright (C) 1999-2006, International Business Machines
4
* Corporation and others. All Rights Reserved.
5
**********************************************************************
9
* defines variables and functions pertaining to converter name resolution
10
* aspect of the conversion code
16
#include "unicode/utypes.h"
18
#if !UCONFIG_NO_CONVERSION
22
#define UCNV_AMBIGUOUS_ALIAS_MAP_BIT 0x8000
23
#define UCNV_CONTAINS_OPTION_BIT 0x4000
24
#define UCNV_CONVERTER_INDEX_MASK 0xFFF
25
#define UCNV_NUM_RESERVED_TAGS 2
26
#define UCNV_NUM_HIDDEN_TAGS 1
30
UCNV_IO_STD_NORMALIZED,
31
UCNV_IO_NORM_TYPE_COUNT
35
uint16_t stringNormalizationType;
36
uint16_t containsCnvOptionInfo;
37
} UConverterAliasOptions;
39
typedef struct UConverterAlias {
40
const uint16_t *converterList;
41
const uint16_t *tagList;
42
const uint16_t *aliasList;
43
const uint16_t *untaggedConvArray;
44
const uint16_t *taggedAliasArray;
45
const uint16_t *taggedAliasLists;
46
const UConverterAliasOptions *optionTable;
47
const uint16_t *stringTable;
48
const uint16_t *normalizedStringTable;
50
uint32_t converterListSize;
52
uint32_t aliasListSize;
53
uint32_t untaggedConvArraySize;
54
uint32_t taggedAliasArraySize;
55
uint32_t taggedAliasListsSize;
56
uint32_t optionTableSize;
57
uint32_t stringTableSize;
58
uint32_t normalizedStringTableSize;
62
* \var ucnv_io_stripForCompare
63
* Remove the underscores, dashes and spaces from the name, and convert
64
* the name to lower case.
65
* @param dst The destination buffer, which is <= the buffer of name.
66
* @param dst The destination buffer, which is <= the buffer of name.
67
* @see ucnv_compareNames
68
* @return the destination buffer.
70
#if U_CHARSET_FAMILY==U_ASCII_FAMILY
71
# define ucnv_io_stripForCompare ucnv_io_stripASCIIForCompare
72
#elif U_CHARSET_FAMILY==U_EBCDIC_FAMILY
73
# define ucnv_io_stripForCompare ucnv_io_stripEBCDICForCompare
75
# error U_CHARSET_FAMILY is not valid
78
U_CAPI char * U_EXPORT2
79
ucnv_io_stripASCIIForCompare(char *dst, const char *name);
81
U_CAPI char * U_EXPORT2
82
ucnv_io_stripEBCDICForCompare(char *dst, const char *name);
85
* Map a converter alias name to a canonical converter name.
86
* The alias is searched for case-insensitively, the converter name
87
* is returned in mixed-case.
88
* Returns NULL if the alias is not found.
89
* @param alias The alias name to be searched.
90
* @param containsOption A return value stating whether the returned converter name contains an option (a comma)
91
* @param pErrorCode The error code
92
* @return the converter name in mixed-case, return NULL if the alias is not found.
95
ucnv_io_getConverterName(const char *alias, UBool *containsOption, UErrorCode *pErrorCode);
98
* Return the number of all known converter names (no aliases).
99
* @param pErrorCode The error code
100
* @return the number of all aliases
103
ucnv_io_countKnownConverters(UErrorCode *pErrorCode);
106
* Swap an ICU converter alias table. See implementation for details.
109
U_CAPI int32_t U_EXPORT2
110
ucnv_swapAliases(const UDataSwapper *ds,
111
const void *inData, int32_t length, void *outData,
112
UErrorCode *pErrorCode);
116
#endif /* _UCNV_IO */
119
* Hey, Emacs, please set the following:
122
* indent-tabs-mode: nil