From 3d11a4cf6758699ba939ec442d2d688f9c6eff07 Mon Sep 17 00:00:00 2001 From: Andy Heninger Date: Wed, 19 Oct 2005 00:40:52 +0000 Subject: [PATCH] ICU-4639 changes after review by Markus. X-SVN-Rev: 18700 --- icu4c/source/i18n/unicode/ucsdet.h | 115 ++++++++--------------------- 1 file changed, 30 insertions(+), 85 deletions(-) diff --git a/icu4c/source/i18n/unicode/ucsdet.h b/icu4c/source/i18n/unicode/ucsdet.h index d3ffa84213b..f4c7b058729 100644 --- a/icu4c/source/i18n/unicode/ucsdet.h +++ b/icu4c/source/i18n/unicode/ucsdet.h @@ -12,46 +12,14 @@ * * ICU Character Set Detection, API for C * -* Draft version 28 Aug 2005 -* -* Questions and Issues -* -* 0 is (char *) or (UChar *) for the encoding name parameters? -* o char * is consistent with the converter API encoding name params. -* o char * causes awkwardness in 100% Unicode apps. -* You would think that a Unicode library would use Unicode for -* strings. -* -* -* 0 UText: With UFILE related functionality all being move into the realm of -* ICU IO, does it still make sense to support UText directly from -* the CharsetDetection API? -* -* 0 The match type (BOM, encoding scheme, language type, etc.) from the -* Java API is omitted for now. It didn't get implemented in the -* Java for ICU 3.4, and I don't see it as being very useful. -* -* -* Changes -* -* - removed all FILE and UFILE related functions. Equivalent functionality -* will be added to the icu io package. -* -* - Changed UCharSetDetector to UCharsetDetector, to match the Java spelling. -* -* - Add UCharsetMatch, an abstract type to represent a match. More closely -* follows the structure of the Java API. -* -* - add ucsdet_detect(), ucsdet_detectAll(), remove ucsdet_getDetectedCount(). -* -* - removed the UText interface. This only makes sense when the byte input is -* coming in from a stream, a capability that is moving into icu io. +* Draft version 18 Oct 2005 * */ #ifndef CSDET_H #define CSDET_H #include "unicode/utypes.h" +#include "unicode/uenum.h" #ifndef U_HIDE_DRAFT_API @@ -155,7 +123,8 @@ ucsdet_setDeclaredEncoding(UCharsetDetector *csd, const char *encoding, int32_t * * @param csd the charset detector to be used. * @param status any error conditions are reported back in this variable. - * @return a UCharsetMatch representing the best matching charset. + * @return a UCharsetMatch representing the best matching charset, + * or NULL if no charset matches the byte data. * * @draft ICU 3.6 */ @@ -173,8 +142,8 @@ ucsdet_detect(UCharsetDetector *csd, UErrorCode *status); * the all of input data. *

* The returned UCharsetMatch objects are owned by the UCharsetDetector. - * They will remain valid until the detector input is reset, or until - * the detector is closed. + * They will remain valid until the detector is closed or modified + * *

* Return an error if *