#include <stdlib.h>
#include <idn-int.h>
Go to the source code of this file.
Enumerations | |
enum | Pr29_rc { PR29_SUCCESS = 0, PR29_PROBLEM = 1, PR29_STRINGPREP_ERROR = 2 } |
Functions | |
const char * | pr29_strerror (Pr29_rc rc) |
int | pr29_4 (const uint32_t *in, size_t len) |
int | pr29_4z (const uint32_t *in) |
int | pr29_8z (const char *in) |
enum Pr29_rc |
int pr29_4 | ( | const uint32_t * | in, | |
size_t | len | |||
) |
pr29_4 - check if input trigger Unicode normalization bugs
in | input array with unicode code points. | |
len | length of input array with unicode code points. |
Return value: Returns the Pr29_rc value PR29_SUCCESS on success, and PR29_PROBLEM if the input sequence is a "problem sequence" (i.e., may be normalized into different strings by different implementations).
Definition at line 1237 of file pr29.c.
References PR29_PROBLEM, and PR29_SUCCESS.
Referenced by pr29_4z().
int pr29_4z | ( | const uint32_t * | in | ) |
pr29_4z - check if input trigger Unicode normalization bugs
in | zero terminated array of Unicode code points. |
Return value: Returns the Pr29_rc value PR29_SUCCESS on success, and PR29_PROBLEM if the input sequence is a "problem sequence" (i.e., may be normalized into different strings by different implementations).
Definition at line 1278 of file pr29.c.
References pr29_4().
Referenced by pr29_8z().
int pr29_8z | ( | const char * | in | ) |
pr29_8z - check if input trigger Unicode normalization bugs
in | zero terminated input UTF-8 string. |
Return value: Returns the Pr29_rc value PR29_SUCCESS on success, and PR29_PROBLEM if the input sequence is a "problem sequence" (i.e., may be normalized into different strings by different implementations), or PR29_STRINGPREP_ERROR if there was a problem converting the string from UTF-8 to UCS-4.
Definition at line 1303 of file pr29.c.
References pr29_4z(), PR29_STRINGPREP_ERROR, stringprep_utf8_to_ucs4(), and uint32_t.
const char* pr29_strerror | ( | Pr29_rc | rc | ) |
pr29_strerror - return string describing pr29 error code
rc | an Pr29_rc return code. |
PR29_SUCCESS: Successful operation. This value is guaranteed to always be zero, the remaining ones are only guaranteed to hold non-zero values, for logical comparison purposes. PR29_PROBLEM: A problem sequence was encountered. PR29_STRINGPREP_ERROR: The character set conversion failed (only for pr29_8() and pr29_8z()).
Return value: Returns a pointer to a statically allocated string containing a description of the error with the return code .
Definition at line 49 of file strerror-pr29.c.
References _, PR29_PROBLEM, PR29_STRINGPREP_ERROR, and PR29_SUCCESS.