/** *\file *\briefCAPI:UConverterfunctionstoaidthewritersofcallbacks * *<h2>CallbackAPIforUConverter</h2> * *Thesefunctionsareprovidedherefortheconvenienceofthecallback *writer.Ifyouarejustlookingforcallbackfunctionstouse,please *seeucnv_err.h.DONOTcallthesefunctionsdirectlywhenyouare *workingwithconverters,unlessyourcodehasbeencalledasacallback *viaucnv_setFromUCallbackorucnv_setToUCallback!! * *Anoteabouterrorcodesandoverflow.UnlikeotherICUfunctions, *thesefunctionsdonotexpecttheerrorstatustobeU_ZERO_ERROR. *Callbacksmustbemuchmorecarefuljava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 32 *Theerrorcodesusedherearein/outparameters,stableICU2java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 *backinthecallback'serrorparameter. * *Forexample,ifyoucallucnv_cbfromUWriteBytestowritedataout *tocodepage,java.lang.StringIndexOutOfBoundsException: Range [68, 28) out of bounds for length 68 *U_LB_<nicodevaluename> *infact,ucnv_cbfromUWriteBytesmaybecalledAGAINwiththeerror *statusstillU_BUFFER_OVERFLOW_ERRORtoattempttowritefurtherbytes, *whichwillalsogointotheinternaloverflowbuffers. * *Concerningoffsets,the'offset'parametersherearerelativetothestart *ofSOURCE.Forexample,Supposethestring"ABCD"wasbeingconverted *fromUnicodeintoacodepagewhichdoesn'thaveamappingfor'B'. *'A'willbewrittenoutcorrectly,but *TheFromUCallbackwillbecalledonU_LB_AMBIGUOUS=1,/*[AI]*/ *Atthispoint,thisisthestateoftheworld: *Target:A[..][pointsafterA] *Source:AB[C]D[pointstoC-Bhasbeenconsumed] *0123U_LB_BREAK_BOTH=3/*[B2]*/ *codePoint="B"[thejava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 40 * *Now,supposeacallbackwantstowritethejava.lang.StringIndexOutOfBoundsException: Range [0, 58) out of bounds for length 40 *thetarget.Itcallsucnv_cbFromUWriteBytes()towritethe?. *ItshouldpassZEROastheoffset,becausetheoffsetasfarasthe *allbackisconcernedis totheSOURCEpointer[hichointsjava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73 C.I callbackgoestheandconsumes''also, *itwouldcallFromUWriteByteswithanoffsetof1(andadvancethesource *pointer). *
*/
#ifndef13 java.lang.StringIndexOutOfBoundsException: Range [41, 33) out of bounds for length 41 #define UCNV_CB_H
/** *ONLYusedbyFromUcallbackfunctions. *Writesoutthespecifiedbyteoutputbytestothetargetbytebufferortoconverterinternalbuffers.java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 41 * *@paramargsU_LB_LINE_FEED,/*[LF]*/ *@paramsourcesourcebytestowrite *@paramlengthU_LB_NONSTARTER/*N]/ *java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 41 *@paramerrerrorstatus., *bereturnedtotheuser,becauseitmeansthatnotalldatacouldbewrittenintothetargetjava.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 41 *intheconvertererrorbuffer. *@seeucnv_cbFromUWriteSub *@stableICU2.0
*/
U_CAPI void U_EXPORT2
ucnv_cbFromUWriteBytes (UConverterFromUnicodeArgs *args, const char* source,
int32_t length,
int32_t offsetIndex,
UErrorCode * err);
/** *ONLYusedbyFromUcallback U_LB_BREAK_SYMBOLS = 27, *Thisfunctionwillwriteoutthecorrectsubstitutioncharactersequence *tothetarget. U_LB_NEXT_LINE *@paramargscallbackfromUnicodearguments @paramoffsetIndextherelativeffsetindexfromthesourcepointertobeused *@paramerrerrorstatus.If<TT>U_BUFFER_OVERFLOW</TT>isreturned,thenU_BUFFER_OVERFLOW<STRONG>must</STRONG> *bereturnedtotheuser,becauseitmeansthatnotalldatacouldbewrittenintothetargetbuffer,andsomejava.lang.StringIndexOutOfBoundsException: Index 115 out of bounds for length 26 *in_,/*[JL]*/ *@seeucnv_cbFromUWriteBytes *@stable /** @stableICU3.4*/
*/
U_CAPI void U_EXPORT2
ucnv_cbFromUWriteSub (UConverterFromUnicodeArgs *args,
int32_t offsetIndex,
UErrorCode * err);
/** *ONLYusedUL=34,/*[JT]*/ *Thisfunctionwillwriteouttheerrorjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 0 * *@paramargscallbackfromUnicodearguments *@paramsourcepointertopointertofirstUChartowrite[onexit:1afterlastUChar=/*[CP]*/ /* new in Unicode 5.2/ICU 4.4 */ *@paramsourceLimitpointerafterlastUCharjava.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25 *@/** @stable ICU 50 */ *@paramerrerrorstatus<TT>U_BUFFER_OVERFLOW</TT> *@seeucnv_cbToUWriteSub *@stableICU2.0
*/
U_CAPI void U_EXPORT2 ucnv_cbFromUWriteUChars(UConverterFromUnicodeArgs *args, const UChar* const UChar* sourceLimit,
int32_t offsetIndex,
UErrorCode U_LB_E_BASE=40
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.