diff --git a/icu4c/source/common/ucnv_cnv.h b/icu4c/source/common/ucnv_cnv.h index 6b18bde0be3..5b948f4fbba 100644 --- a/icu4c/source/common/ucnv_cnv.h +++ b/icu4c/source/common/ucnv_cnv.h @@ -84,7 +84,12 @@ typedef void (*UConverterReset) (UConverter *cnv, UConverterResetChoice choice); */ typedef void (*UConverterToUnicode) (UConverterToUnicodeArgs *, UErrorCode *); -/* same rules as for UConverterToUnicode */ +/* + * Same rules as for UConverterToUnicode. + * A lead surrogate is kept in fromUChar32 across buffers, and if an error + * occurs, then the offending input code point must be put into fromUChar32 + * as well. + */ typedef void (*UConverterFromUnicode) (UConverterFromUnicodeArgs *, UErrorCode *); /* diff --git a/icu4c/source/common/unicode/utypes.h b/icu4c/source/common/unicode/utypes.h index 27aad128183..d2c42e9c084 100644 --- a/icu4c/source/common/unicode/utypes.h +++ b/icu4c/source/common/unicode/utypes.h @@ -528,9 +528,9 @@ typedef enum UErrorCode { U_MEMORY_ALLOCATION_ERROR = 7, /**< Memory allocation error */ U_INDEX_OUTOFBOUNDS_ERROR = 8, /**< Trying to access the index that is out of bounds */ U_PARSE_ERROR = 9, /**< Equivalent to Java ParseException */ - U_INVALID_CHAR_FOUND = 10, /**< In the Character conversion routines: Invalid character or sequence was encountered. In other APIs: Invalid character or code point name. */ - U_TRUNCATED_CHAR_FOUND = 11, /**< In the Character conversion routines: More bytes are required to complete the conversion successfully */ - U_ILLEGAL_CHAR_FOUND = 12, /**< In codeset conversion: a sequence that does NOT belong in the codepage has been encountered */ + U_INVALID_CHAR_FOUND = 10, /**< Character conversion: Unmappable input sequence. In other APIs: Invalid character. */ + U_TRUNCATED_CHAR_FOUND = 11, /**< Character conversion: Incomplete input sequence. */ + U_ILLEGAL_CHAR_FOUND = 12, /**< Character conversion: Illegal input sequence/combination of input units.. */ U_INVALID_TABLE_FORMAT = 13, /**< Conversion table file found, but corrupted */ U_INVALID_TABLE_FILE = 14, /**< Conversion table file not found */ U_BUFFER_OVERFLOW_ERROR = 15, /**< A result would not fit in the supplied buffer */