ICU 4.2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
uidna.h
Go to the documentation of this file.
1 /*
2  *******************************************************************************
3  *
4  * Copyright (C) 2003-2007, International Business Machines
5  * Corporation and others. All Rights Reserved.
6  *
7  *******************************************************************************
8  * file name: uidna.h
9  * encoding: US-ASCII
10  * tab size: 8 (not used)
11  * indentation:4
12  *
13  * created on: 2003feb1
14  * created by: Ram Viswanadha
15  */
16 
17 #ifndef __UIDNA_H__
18 #define __UIDNA_H__
19 
20 #include "unicode/utypes.h"
21 
22 #if !UCONFIG_NO_IDNA
23 
24 #include "unicode/parseerr.h"
25 
59 #define UIDNA_DEFAULT 0x0000
60 
66 #define UIDNA_ALLOW_UNASSIGNED 0x0001
67 
73 #define UIDNA_USE_STD3_RULES 0x0002
74 
115 uidna_toASCII(const UChar* src, int32_t srcLength,
116  UChar* dest, int32_t destCapacity,
117  int32_t options,
118  UParseError* parseError,
119  UErrorCode* status);
120 
121 
166 uidna_toUnicode(const UChar* src, int32_t srcLength,
167  UChar* dest, int32_t destCapacity,
168  int32_t options,
169  UParseError* parseError,
170  UErrorCode* status);
171 
172 
217 uidna_IDNToASCII( const UChar* src, int32_t srcLength,
218  UChar* dest, int32_t destCapacity,
219  int32_t options,
220  UParseError* parseError,
221  UErrorCode* status);
222 
264 uidna_IDNToUnicode( const UChar* src, int32_t srcLength,
265  UChar* dest, int32_t destCapacity,
266  int32_t options,
267  UParseError* parseError,
268  UErrorCode* status);
269 
305 uidna_compare( const UChar *s1, int32_t length1,
306  const UChar *s2, int32_t length2,
307  int32_t options,
308  UErrorCode* status);
309 
310 #endif /* #if !UCONFIG_NO_IDNA */
311 
312 #endif
int32_t uidna_IDNToUnicode(const UChar *src, int32_t srcLength, UChar *dest, int32_t destCapacity, int32_t options, UParseError *parseError, UErrorCode *status)
Convenience function that implements the IDNToUnicode operation as defined in the IDNA RFC...
int32_t uidna_toUnicode(const UChar *src, int32_t srcLength, UChar *dest, int32_t destCapacity, int32_t options, UParseError *parseError, UErrorCode *status)
This function implements the ToUnicode operation as defined in the IDNA RFC.
#define U_EXPORT2
Definition: platform.h:338
uint16_t UChar
Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned.
Definition: umachine.h:299
C API: Parse Error Information.
int32_t uidna_toASCII(const UChar *src, int32_t srcLength, UChar *dest, int32_t destCapacity, int32_t options, UParseError *parseError, UErrorCode *status)
This function implements the ToASCII operation as defined in the IDNA RFC.
int32_t uidna_compare(const UChar *s1, int32_t length1, const UChar *s2, int32_t length2, int32_t options, UErrorCode *status)
Compare two IDN strings for equivalence.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:593
A UParseError struct is used to returned detailed information about parsing errors.
Definition: parseerr.h:56
Basic definitions for ICU, for both C and C++ APIs.
int32_t uidna_IDNToASCII(const UChar *src, int32_t srcLength, UChar *dest, int32_t destCapacity, int32_t options, UParseError *parseError, UErrorCode *status)
Convenience function that implements the IDNToASCII operation as defined in the IDNA RFC...
signed int int32_t
Define 64 bit limits.
Definition: pwin32.h:143
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:117