1999-08-16 21:50:52 +00:00
|
|
|
/*
|
2001-03-21 20:44:20 +00:00
|
|
|
**********************************************************************
|
|
|
|
* Copyright (C) 1999-2001, International Business Machines
|
|
|
|
* Corporation and others. All Rights Reserved.
|
|
|
|
**********************************************************************
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* ucnv_io.h:
|
|
|
|
* defines variables and functions pertaining to file access, and name resolution
|
|
|
|
* aspect of the library
|
1999-08-16 21:50:52 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef UCNV_IO_H
|
|
|
|
#define UCNV_IO_H
|
|
|
|
|
1999-12-28 23:39:02 +00:00
|
|
|
#include "unicode/utypes.h"
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2002-06-28 23:13:30 +00:00
|
|
|
#define UCNV_AMBIGUOUS_ALIAS_MAP_BIT 0x8000
|
2002-07-12 23:55:31 +00:00
|
|
|
#define UCNV_CONVERTER_INDEX_MASK 0xFFF
|
2002-08-08 22:46:05 +00:00
|
|
|
#define UCNV_NUM_RESERVED_TAGS 2
|
2002-10-30 22:52:08 +00:00
|
|
|
#define UCNV_NUM_HIDDEN_TAGS 1
|
2002-06-28 23:13:30 +00:00
|
|
|
|
2002-09-06 00:48:35 +00:00
|
|
|
/**
|
|
|
|
* Remove the underscores, dashes and spaces from the name, and convert
|
|
|
|
* the name to lower case.
|
|
|
|
* @param dst The destination buffer, which is <= the buffer of name.
|
|
|
|
* @param dst The destination buffer, which is <= the buffer of name.
|
|
|
|
* @return the destination buffer.
|
|
|
|
*/
|
|
|
|
U_CFUNC char * U_EXPORT2
|
|
|
|
ucnv_io_stripForCompare(char *dst, const char *name);
|
|
|
|
|
1999-11-24 00:39:43 +00:00
|
|
|
/**
|
|
|
|
* Map a converter alias name to a canonical converter name.
|
|
|
|
* The alias is searched for case-insensitively, the converter name
|
|
|
|
* is returned in mixed-case.
|
|
|
|
* Returns NULL if the alias is not found.
|
2002-07-03 12:05:56 +00:00
|
|
|
* @param alias The alias name to be searched.
|
2002-09-06 00:48:35 +00:00
|
|
|
* @param pErrorCode The error code
|
2002-07-03 12:05:56 +00:00
|
|
|
* @return the converter name in mixed-case, return NULL if the alias is not found.
|
1999-11-24 00:39:43 +00:00
|
|
|
*/
|
1999-11-23 23:02:55 +00:00
|
|
|
U_CFUNC const char *
|
2003-05-07 16:39:24 +00:00
|
|
|
ucnv_io_getConverterName(const char *alias, UErrorCode *pErrorCode);
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2002-06-28 23:13:30 +00:00
|
|
|
/**
|
|
|
|
* The count for ucnv_io_getAliases and ucnv_io_getAlias
|
2002-07-03 12:05:56 +00:00
|
|
|
* @param alias The alias name to be counted
|
2002-09-06 00:48:35 +00:00
|
|
|
* @param pErrorCode The error code
|
2002-07-03 12:05:56 +00:00
|
|
|
* @return the alias count
|
2002-06-28 23:13:30 +00:00
|
|
|
*/
|
|
|
|
U_CFUNC uint16_t
|
|
|
|
ucnv_io_countAliases(const char *alias, UErrorCode *pErrorCode);
|
|
|
|
|
1999-11-24 00:39:43 +00:00
|
|
|
/**
|
|
|
|
* Search case-insensitively for a converter alias and set aliases to
|
|
|
|
* a pointer to the list of aliases for the actual converter.
|
|
|
|
* The first "alias" is the canonical converter name.
|
|
|
|
* The aliases are stored consecutively, in mixed case, each NUL-terminated.
|
|
|
|
* There are as many strings in this list as the return value specifies.
|
|
|
|
* Returns the number of aliases including the canonical converter name,
|
|
|
|
* or 0 if the alias is not found.
|
2002-07-03 12:05:56 +00:00
|
|
|
* @param alias The canonical converter name
|
|
|
|
* @param start
|
|
|
|
* @param aliases A pointer to the list of aliases for the actual converter
|
|
|
|
* @return the number of aliases including the canonical converter name, or 0 if the alias is not found.
|
1999-11-24 00:39:43 +00:00
|
|
|
*/
|
1999-11-23 23:02:55 +00:00
|
|
|
U_CFUNC uint16_t
|
2002-06-28 23:13:30 +00:00
|
|
|
ucnv_io_getAliases(const char *alias, uint16_t start, const char **aliases, UErrorCode *pErrorCode);
|
1999-08-16 21:50:52 +00:00
|
|
|
|
1999-11-24 00:39:43 +00:00
|
|
|
/**
|
|
|
|
* Search case-insensitively for a converter alias and return
|
2000-04-14 05:22:29 +00:00
|
|
|
* the (n)th alias.
|
1999-11-24 00:39:43 +00:00
|
|
|
* Returns NULL if the alias is not found.
|
2002-07-03 12:05:56 +00:00
|
|
|
* @param alias The converter alias
|
|
|
|
* @param n The number specifies which alias to get
|
2002-09-06 00:48:35 +00:00
|
|
|
* @param pErrorCode The error code
|
2002-07-03 12:05:56 +00:00
|
|
|
* @return the (n)th alias and return NULL if the alias is not found.
|
1999-11-24 00:39:43 +00:00
|
|
|
*/
|
1999-11-23 23:02:55 +00:00
|
|
|
U_CFUNC const char *
|
2000-04-14 05:22:29 +00:00
|
|
|
ucnv_io_getAlias(const char *alias, uint16_t n, UErrorCode *pErrorCode);
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2000-11-17 19:28:31 +00:00
|
|
|
/**
|
|
|
|
* Return the number of all standard names.
|
2002-07-03 12:05:56 +00:00
|
|
|
* @param pErrorCode The error code
|
|
|
|
* @return the number of all standard names
|
2000-11-17 19:28:31 +00:00
|
|
|
*/
|
|
|
|
U_CFUNC uint16_t
|
|
|
|
ucnv_io_countStandards(UErrorCode *pErrorCode);
|
|
|
|
|
1999-12-14 00:37:27 +00:00
|
|
|
/**
|
|
|
|
* Return the number of all converter names.
|
2002-07-03 12:05:56 +00:00
|
|
|
* @param pErrorCode The error code
|
|
|
|
* @return the number of all converter names
|
1999-12-14 00:37:27 +00:00
|
|
|
*/
|
|
|
|
U_CFUNC uint16_t
|
|
|
|
ucnv_io_countAvailableConverters(UErrorCode *pErrorCode);
|
|
|
|
|
|
|
|
/**
|
2000-04-14 05:22:29 +00:00
|
|
|
* Return the (n)th converter name in mixed case, or NULL
|
1999-12-14 00:37:27 +00:00
|
|
|
* if there is none (typically, if the data cannot be loaded).
|
|
|
|
* 0<=index<ucnv_io_countAvailableConverters().
|
2002-07-03 12:05:56 +00:00
|
|
|
* @param n The number specifies which converter name to get
|
|
|
|
* @param pErrorCode The error code
|
|
|
|
* @return the (n)th converter name in mixed case, or NULL if there is none.
|
1999-12-14 00:37:27 +00:00
|
|
|
*/
|
|
|
|
U_CFUNC const char *
|
2000-04-14 05:22:29 +00:00
|
|
|
ucnv_io_getAvailableConverter(uint16_t n, UErrorCode *pErrorCode);
|
1999-12-14 00:37:27 +00:00
|
|
|
|
2002-06-13 16:43:41 +00:00
|
|
|
/**
|
|
|
|
* Return the (n)th converter name in mixed case, or NULL
|
|
|
|
* if there is none (typically, if the data cannot be loaded).
|
|
|
|
* 0<=index<ucnv_io_countAvailableConverters().
|
|
|
|
*/
|
|
|
|
U_CFUNC void
|
|
|
|
ucnv_io_flushAvailableConverterCache(void);
|
|
|
|
|
1999-11-24 00:39:43 +00:00
|
|
|
/**
|
|
|
|
* Return the number of all aliases (and converter names).
|
2002-07-03 12:05:56 +00:00
|
|
|
* @param pErrorCode The error code
|
|
|
|
* @return the number of all aliases
|
1999-11-24 00:39:43 +00:00
|
|
|
*/
|
1999-11-23 23:02:55 +00:00
|
|
|
U_CFUNC uint16_t
|
|
|
|
ucnv_io_countAvailableAliases(UErrorCode *pErrorCode);
|
1999-08-16 21:50:52 +00:00
|
|
|
|
1999-12-04 00:55:54 +00:00
|
|
|
/**
|
|
|
|
* Get the name of the default converter.
|
|
|
|
* This name is already resolved by <code>ucnv_io_getConverterName()</code>.
|
2002-07-03 12:05:56 +00:00
|
|
|
* @return the name of the default converter
|
1999-12-04 00:55:54 +00:00
|
|
|
*/
|
|
|
|
U_CFUNC const char *
|
1999-12-22 22:57:04 +00:00
|
|
|
ucnv_io_getDefaultConverterName(void);
|
1999-12-04 00:55:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the name of the default converter.
|
2002-07-03 12:05:56 +00:00
|
|
|
* @param name The name set to the default converter
|
1999-12-04 00:55:54 +00:00
|
|
|
*/
|
|
|
|
U_CFUNC void
|
|
|
|
ucnv_io_setDefaultConverterName(const char *name);
|
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
#endif /* _UCNV_IO */
|
2000-08-10 01:32:29 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Hey, Emacs, please set the following:
|
|
|
|
*
|
|
|
|
* Local Variables:
|
|
|
|
* indent-tabs-mode: nil
|
|
|
|
* End:
|
|
|
|
*
|
|
|
|
*/
|