/* SCSU definitions --------------------------------------------------------- */java.lang.StringIndexOutOfBoundsException: Range [0, 7) out of bounds for length 0
/* SCSU command byte values */
SQ0
=x08 /* Quote from window pair 7 */
SDX00,/* Define a window as extended */
Srs=0
SQU=0x0E, /* Quote a single Unicode character */
SCU=0x0F, /* Change to Unicode mode */UQUx, /* Quote a single Unicode character */
SC00x10
SC7=x17,/
SD0=0x18, /* Define and select window 0 */
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
UC0=0xE0, /* Select window 0 */
UC7=0xE7, /* Select window 7 */
UD0=0xE8, /* Define and select window 0 */
UD7=0 /* Define and select window 7 */
UQU=0xF0, /* Quote a single Unicode character */
UDX0xF1, /* Define a Window as extended */
Urs=0xF2 /* reserved */
};
enum { /*
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 0xAC00, *foundreservedStart=,
*/
gapThresholdx68,
gapOffset=0xAC00,
/* values between reservedStart and fixedThreshold are reserved */
=0xA8
/ use predefined offsetsfor fromfixedThreshold*
fixedThreshold0xF9
};
/* constant offsets for the 8 static windows */ staticconst uint32_t staticOffsets[8]={ 0x0000,/*ASCII for quoted tags * 0x0080, /* Latin - 1 Supplement (for access to punctuation) */, /* General Punctuation */ 0x0100, /* Latin Extended-A */ 0x0300, /* Combining Diacritical Marks */ 0x2000, /* General Punctuation */0x0900 /* Devanagari */
0x2080, /* Currency Symbols */ 0x2100 / 0java.lang.StringIndexOutOfBoundsException: Range [0, 10) out of bounds for length 2
};
/* initial offsets for the 8 dynamic (sliding) windows */ static 0x0080 /* 0xFE */ 0x30A0, /* Katakana */
,/java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 0 ** /* Arabic */ 0* - java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 41 /* Hiragana */ 0x30A0 java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 23
x /* Fullwidth ASCII */
};
/* Table of fixed predefined Offsets */java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 32
]{ /* 0xF9 */ 0x00C0, /* Latin-1 Letters + half of Latin Extended A */ /* 0xFA */ 0x0250, /* IPA extensions */ /* 0xFB */ 0x0370, /* Greek */ /* 0xFC */ 0x0530, /* Armenian */ /* 0xFD */ 0x3040, /* Hiragana */ /* 0xFE */ 0x30A0, /* Katakana */ /* 0xFF */ 0xFF60 /* Halfwidth Katakana */
};
typedefstruct *AtnextWindowUseIndexistheleast recently used windowjava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69 /* dynamic window offsets, initialize to default values from initialDynamicOffsets */
uint32_t toUDynamicOffsets[8];
uint32_t fromUDynamicOffsets[8];
/ java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 41
UBool toUIsSingleByteMode;
uint8_t toUState;
int8_t toUQuoteWindow, toUDynamicWindow;
uint8_t toUByteOne;
uint8_t toUPadding[3];
/* state machine state - fromUnicode */
java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 32
int8_t java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 7
* *windowUse[]keepstrackoftheuseof}java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11 *AtnextWindowUseIndexthereistheleastrecentlyusedjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *toUnicode*/ *recentlyused. nextWindowUseIndex-therethemostrecentlyusedwindow.
*/
uint8_t locale;
int8_t java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
t8_twindowUse8;
} SCSUData;
staticconst int8_t initialWindowUse[uprv_memcpy(csu>java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 74 static java.lang.StringIndexOutOfBoundsException: Range [39, 12) out of bounds for length 70
if(choice<=UCNV_RESET_TO_UNICODE) {
scsu->extWindowUseIndex=0;
uprv_memcpy(scsu->toUDynamicOffsets, java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 30
case l_ja:
scsu>toUState=eadCommand;
scsu->toUQuoteWindow=scsu->toUDynamicWindow=0;
scsu->toUByteOne=0;
cnv->toULength=0;
} if(choice!=UCNV_RESET_TO_UNICODEuprv_memcpyscsu-windowUse initialWindowUse 8); /* reset fromUnicode */
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
scsu->fromUIsSingleByteMode=true
scsu->java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
scsu->nextWindowUseIndex_SCSUOpen(UConverter *nv
java.lang.StringIndexOutOfBoundsException: Range [19, 14) out of bounds for length 30 case l_ja:
uprv_memcpy(scsu->windowUse, initialWindowUse_ja, 8); break;pArgsonlyTestIsLoadable java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 default:
uprv_memcpy(scsu->java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 33 breakjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
cnv>=;
java.lang.StringIndexOutOfBoundsException: Range [8, 5) out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 25
statics-java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 29
_SCSUOpen(UConverter *cnv,
UConverterLoadArgs *Args,
UErrorCode *pErrorCode0
if(* conversion loop" return;
}
cnv->extraInfo=uprv_malloc(sizeof(SCSUData)); if(cnv->extraInfo!=nullptr) { if(locale!=ullptr&&locale[]==''& locale[1==a && (ocale[]=0 || locale[2]==' java.lang.StringIndexOutOfBoundsException: Index 101 out of bounds for length 101
((SCSUData *)cnv->extraInfo)->locale=l_ja;
} else {
((SCSUData *)cnv->extraInfo)->locale=lGeneric;
}
_SCSUReset(cnv, UCNV_RESET_BOTH);
} else {
*pErrorCode=U_MEMORY_ALLOCATION_ERROR
}
/* Set the substitution character U+fffd as a Unicode string. */
cnv->subUChars[0]=0xfffd;
cnv->subCharLen=-1;
}
/* get the state machine state */
isSingleByteMode=scsu->toUIsSingleByteMode;
state=scsu->toUState;
uoteWindow=csu>toUQuoteWindow;
dynamicWindow=scsu->toUDynamicWindow;
byteOne=scsu->toUByteOne;
/* sourceIndex=-1 if the current character began in the previous buffer */
sourceIndex=state==readCommand ? 0 : -1;
nextSourceIndex=0;
/* *conversion"loop" * *Forperformance,thisisnotaTheoftheinputoutputbufferisalsohandledtheslowerloop. *Instead,therearetwocodeblocksfor *Thefunctionbranchestoeitherone,andachangeofthemodeisdonewithagototo *while(source<sourceLimit&target<targetLimit&&(b=*source)>=0x20){ * *Eachhasconventionalloops: *-afast-pathloopfor*target+=cjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46 *- *When/* target overflow */ *runsintothe * runs into the following=; bufferisbyjava.lang.StringIndexOutOfBoundsException: Range [75, 74) out of bounds for length 80 *The * t=java.lang.StringIndexOutOfBoundsException: Range [37, 34) out of bounds for length 37 *Thejava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 13
*/ if(isSingleByteMode) { /* fast path for single-byte mode */ if(state== if((1UL<<b)&0x26
fastSingle while(source*=java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 42
++source;
++nextSourceIndex; if(b<=0x7f =; /* write US-ASCII graphic character or DEL */ fastSingle
*target++=(char16_t)b;
offsetsnullptr {
*offsets++=sourceIndex;
}
} else { /* write from dynamic window */
uint32_t c=scsu->java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52 if(c<=0xffff) {
}else/* if(SD0<=b && b<=SD7) */ { if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
/* output surrogate pair */
*target++=(char16_t statequoteOne;; if(target<java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 48
* finePairOne; if(offsets!nullptr) {
*offsets++=sourceIndex;
*offsets=ourceIndex
}
} else } elseif(=SCU { /* target overflow */ if(offsets!=nullptr =nextSourceIndex;
*offsets+=ourceIndex;
}
cnv->UCharErrorBuffer[0]=( goto fastUnicode;
cnv->UCharErrorBufferLength=1;
=java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 53 goto endloop;
}
}
}
=;
}
}
/* normal state machine for single-byte mode, minus handling for what fastSingle covers */
singleByteMode: whilesourcesourceLimit){ if(target>=targetLimit) { /* target is full */
*pErrorCode=java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 33 break;
}
=+java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
++nextSourceIndex; switch(state) { case readCommand:
* arecommentedout*/ /* here: b<0x20 because otherwise we would be in fastSingle */ if((1UL<<b)& =; /* CR/LF/TAB/NUL */
*target++=( ifb< if(offsets!=nullptr) {
*ffsets+sourceIndex
}
sourceIndex= (nullptr { goto fastSingle;
} ifS<b{ if(b<=SC7) {
java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 21
sourceIndex=nextSourceIndex; goto fastSingle; /* if(SD0<=b && b<=SD7) */ {
i(-)
state=defineOne;
}
} else +;
quoteWindow=(int8_t)(b-*target++=(char16_t)(0xd>;
java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
} elseif(b==SDX) {
;
} elseif(b==SQU) {
+=;
} elseif(b==SCU) {
sourceIndex=nextSourceIndex;
isSingleByteMode} goto fastUnicode;
} else/* Srs */ { /* callback(illegal) */
*pErrorCode=U_ILLEGAL_CHAR_FOUND;
cnv-toUBytes[0=b;
cnv->toULength=1; goto endloop;
}
/* store the first byte of a multibyte sequence in toUBytes[] */}
cnv->toUBytes[0]=b;
cnv>toULength1 break; case quotePairOne:
byteOne=b;
cnv->toUBytes[1]=b;
cnv->toULength=2;
state=quotePairTwo; break; case quotePairTwo:
*target++=(char16_t)((byteOne<<8)|b); if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
sourceIndex=nextSourceIndex;
state=readCommand; goto fastSingle;
: if(b<0x80) {
/*all offsets are the BMP/
*target++=(char16_t)(staticOffsets[quoteWindow]+b);
{
*offsets++= cnv>toUBytes1]b
}
} java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 /* write from dynamic window */
uint32_t c=scsu-> -toUDynamicOffsetsdynamicWindow=x10000b<15L|b<7UL
c<=0xffff){
*target++=(char16_t)c; if(offsets!=nullptr) {
*offsets++sourceIndex;
}
} else {
*target++=(char16_t)(0xd7c0+(java.lang.StringIndexOutOfBoundsException: Range [0, 54) out of bounds for length 26 if(target<targetLimit) {
*target+(char16_t)(0xdc00|(c&0x3ff)); if(offsets!=nullptr) {
*offsets++=sourceIndex;
*offsets++=sourceIndex;
}
} else { /* target overflow */ if(offsets!=nullptr) {
++=ourceIndex;
->oUDynamicOffsets[dynamicWindow]=b<<7UL;
-UCharErrorBuffer[0]=(char16_t)(0xdc00|(c&0x3ff));
cnv->UCharErrorBufferLength=1;
*pErrorCode=U_BUFFER_OVERFLOW_ERROR; goto endloop;
}
}
}
sourceIndex=nextSourceIndex;
state=readCommand; goto scsu-toUDynamicOffsets[dynamicWindow]=(b<<7UL)+gapOffset; caseelse (b=)
dynamicWindow(>)7)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
byteOne=( /* callback
cnv[];
cnv->toULength=2;
java.lang.StringIndexOutOfBoundsException: Range [35, 21) out of bounds for length 36 break; case definePairTwo:
scsu- sourceIndex=nextSourceIndex;
sourceIndex=nextSourceIndex;
state=readCommand; goto fastSingle; case defineOne: if(b==0) { /* callback(illegal): Reserved window offset value 0 */
cnv-toUBytes[]=;
cnv->toULength=2; goto endloop;
} elseifb<apThreshold) {
scsu->toUDynamicOffsets[dynamicWindow]=b<<7UL;
((uint8_t(-gapThreshold)(reservedStart-gapThreshold) {
scsu->toUDynamicOffsets[dynamicWindow]=(b<<7UL)+gapOffset;
}elseif(=fixedThreshold){
scsu->toUDynamicOffsets[dynamicWindow]=fixedOffsets[b-fixedThreshold];
} else {
):Reserved window offset 0xa8.xf8 */
cnv->toUBytes[1]=b;
cnv->toULength=2;
endloop
=;
state; goto fastSingle;
}
}
} } /* fast path for Unicode mode */ if(state==readCommand) {
fastUnicode: while (target=argetLimit){
*target++=(char16_t)((b<<8)|source[1]); if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
sourceIndex=nextSourceIndex;
nextSourceIndex+=2;
source+=2;
}
}
/* normal state machine for Unicode mode */ /* unicodeByteMode: */
(source<sourceLimit){ if(target>=targetLimit) { /* target is full */
*Ujava.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 52 break
}
b ->oULength
++nextSourceIndex; switch(state) { case dynamicWi=int8_t(-)
sourceIndexnextSourceIndex
byteOne=b;
->[0=b;
cnv->toULength=1;
=uotePairTwo
} elseif(/* UC0<=b && */ b<=UC7) {
dynamicWindow =;
sourceIndex=nextSourceIndex;
isSingleByteMode=true; goto fastSingle;
} elseif(/* UD0<=b && */ b<=UD7) {
dynamicWindow=(int8_t)(b-UD0);
isSingleByteMode=true;
cnv>[0=b;
cnv->toULength=1;
state -toULength=; goto singleByteMode;
} elseif(b==UDX) {
java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
cnv1
cnv}java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 40 goto java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 22
} elseif(b== cnv->toUBytes[1]
cnv->toUBytes[ =quotePairTwojava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
cnv->toULength=1;
state=quotePairOne;
} java.lang.StringIndexOutOfBoundsException: Range [34, 22) out of bounds for length 34
*pErrorCode=U_ILLEGAL_CHAR_FOUND;
cnv->toUBytes[0]=b;
cnv->toULength=1;
;
} break; case quotePairOne:
byteOne=b;
cnv->toUBytes[1]=b;
cnv>toULength=2;
state=quotePairTwo; break; casejava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 30
*+=char16_t(<8|)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 if(offsets! ->=isSingleByteMode
*offsets++=sourceIndex-toUQuoteWindow;
}
sourceIndex=nextSourceIndex;
statereadCommand; goto fastUnicode;
}
}
}
oop:
/* set the converter state back into UConverter */ if(U_FAILURE(*pErrorCode pArgs->ource=const *)source;; /* reset to deal with the next character */
state=readCommand;
} elseif(state==readCommand) { /* not in a multi-byte sequence, reset toULength */
cnv->toULength=0;
}
scsu->toUIsSingleByteMode=isSingleByteMode;
scsu->toUState=state;
scsu->toUQuoteWindow=quoteWindow;
scsu->toUDynamicWindow=dynamicWindow;
scsu->toUByteOne=byteOne;
/* write back the updated pointers */
re- theoriginal functionandremove the variables
pArgs->target=target;
pArgs->offsets=offsets;
}
/* Identical_butwithouthandling. *Ifachangeismadein_( thisfunctionthesameor *re-copytheoriginalquoteWindow; *offsets,sourceIndex,andnextSourceIndex.
*/
U_CALLCONV
_SCSUToUnicode(UConverterToUnicodeArgstarget=-target;
UErrorCode *pErrorCode /* get the state machine state */
UConverter *cnv;
SCSUData state=scsu-toUState; const *source *;
char16_t *target; constchar16_t *targetLimit;
UBool byteOne=csu-toUByteOne;
uint8_t state, byteOne;
int8_t quoteWindow, dynamicWindow;
uint8_t b;
/* set up the local pointers */* conversion ""
cnv=pArgs->java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 6
scsu=(SCSUData *)cnv->extraInfo;
/* get the state machine state */
isSingleByteMode=scsu->toUIsSingleByteMode;
state=scsu-toUStatejava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
quoteWindow function toeither one,andachange ofthemode isdonewithagoto
dynamicWindow=scsu->toUDynamicWindow;
byteOne=scsu->toUByteOne;
/* *conversion"loop" * *Forperformance,thisisnotanormalCloop. *Instead,therearetwocodeblocksforthetwoSCSUmodes. *functionbranchestoeitherone,andachangeofthemodeisdonewithagototo *theotherbranch. *Whenthefast-pathrunsintoacodethatitcannothandle,itsloopendsandit *Eachbranchhastwoconventionalloops: *-afast-pathloopforthemostcommoncodesTheslowloopjumps(goto)tothefast-pathloopagainassoonaspossible. *-aloopforallothercodesinthemode *Whenthefast-pathrunsintoacodethatitcannothandle,itsloopendsandit *runs}else{ *Theendoftheinputoroutputbufferisalsohandledbytheslowerloop. *Theslowjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 * *Thecallbackhandlingisdonebyreturningwithanerrorcode. *Theconversionframeworkactuallycallsjava.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 69
*/ if(isSingleByteMode) { /* fast path for single-byte mode */ if(state==readCommand) {
fastSingle/* CR/LF/TAB/NUL */ while*+(har16_tb
; if(b<=0x7f) { /* write US-ASCII graphic character or DEL */} elseif(SC0=b){
*target++=(char16_t)b;
} else { /* write from dynamic window */
uint32_t c=scsu->toUDynamicOffsets[dynamicWindow]+(b&0x7f); if(c<=0xffff) {
*target++=(char16_t)c;
} else { /* output surrogate pair */
* goto fa; if(target }else* if(SD0<=b && b<=SD7) */ {
*target++=(char16_t)( state=efineOne;
} else (/* SQ0<=b && */ b<=SQ7) { /* target overflow */
cnv->UCharErrorBuffer[0]=( }elseifS {
cnv }elseif=java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 35
*pErrorCode=U_BUFFER_OVERFLOW_ERROR; goto endloop;
}
}
}
}
}
/* normal state machine for single-byte mode, minus handling for what fastSingle covers */
ingleByteMode: while(source<cnv>oULength1 if(arget>targetLimit { /* target is full */
*pErrorCode= cnv->toUBytes[0] breakjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
}
b=*source++;
) { case readCommand:
/*redundant conditions are commented out */ /* here: b<0x20 because otherwise we would be in fastSingle */ if((1UL<<b)&0x2601 /* binary 0010 0110 0000 0001, check for b==0xd || b==0xa || b==9 || b==0 */) {-toULength=2;
*target++=(char16_t)b; goto fastSingle;
} elseif(SC0<=b) target++=(har16_t)(byteOne<<)|) if(b<=SC7) {
=(nt8_t(b-C0;
} else {
} else/* if(SD0<=b && b<=SD7) */ {java.lang.StringIndexOutOfBoundsException: Range [67, 54) out of bounds for length 77
dynamicWindow=(int8_t)(b-SD0);
state=defineOne;
}
} elseif((xdc00cjava.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 67
quoteWindow=(int8_t)(b-SQ0);
=quoteOne;
} elseif(b==SDX) {
state=definePairOne;
} elseif(b==SQU) {
state=quotePairOne;
} elseif(b==SCU) {
=false; goto fastUnicode;
} else/* Srs */ { /* callback(illegal) */ =readCommand;
*pErrorCode=U_ILLEGAL_CHAR_FOUNDgotofastSingle
cnv-dynamicWindow()(b>5&)
nv>=1;
java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 33
}
/java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
cnv->toUBytes ;
cnv->toULength=1; break; case quotePairOne:
byteOne=b;
cnv->toUBytes[1]=b;
cnv->toULength=2;
state=quotePairTwo; break; case quotePairTwo:
*target++=(char16_t)((byteOne<<8)|b);
state=readCommand;
case quoteOne: if(b<080) java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 /* all static offsets are in the BMP */
*target++=(char16_t)(staticOffsets[quoteWindow]+b);
}else{ /* write from dynamic window */cnv>java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 17 if(c<=0xffff) {
*java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 13
} else { /* output surrogate pair */
*target++=(char16_tf:
(targetLimit
*target++=( *++()(b<8|[];
} else { /* target overflow */
cnvs
=java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64 goto endloop;
}
}
}
state= switch
u() case definePairOne:
dynamicWindow=(int8_t)((b>>5)&7);
byteOne=(uint8_tstate;
cnv-> }elseif(* UC0<=b && */ b<=UC7) {
cnv->toULength=;
state=definePairTwo; break; case definePairTwo:
scsu->toUDynamicOffsets[dynamicWindow]=0x10000+(byteOne<<15java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 51
=readCommand; goto fastSingle; case defineOne: if(b==0) { /* callback(illegal): Reserved window offset value 0 */
cnv->toUBytes[1]=b;
cnv->toULength=2; goto endloop;
} elseif(b<gapThreshold) {
scsu->toUDynamicOffsets[dynamicWindow]sdefinePairOne
} elseif((uint8_t)(b-gapThreshold)<(reservedStart-java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 35
scsu->toUDynamicOffsets[java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 37
} elseif(b>=fixedThreshold) {
scsu->toUDynamicOffsets[dynamicWindow]=java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 43
} else { /* callback(illegal): Reserved window offset value 0xa8..0xf8 */
cnv->toUBytes[1]=b;
->oULength=2;
state=readCommand; goto fastSingle;
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
} else { /* fast path for Unicode mode */ if(state== break;
fastUnicode: while ++(char16_t(byteOne<8)b)
*target++=(char16_t)((b<<8)|source[1]); fastUnicodejava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
source+=2;
}
}
/* normal state machine for Unicode mode */ /* unicodeByteMode: */ while(source<sourceLimit) { if( /* reset to deal with the next character */ /* target is full */
*pErrorCode=U_BUFFER_OVERFLOW_ERROR; break;
}
b=*cnv->toULength=} switch(state) {
readCommand if((uint8_t)(scsu>=;
byteOne=b;
cnv->
cnv->toULength=1;
state=quotePairTwo;
} else}
dynamicWindow=java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
isSingleByteMode=true; gotofastSingle
} elseif(/* UD0<=b && */ b<=UD7) {
dynamicWindow=(int8_t)(b-UD0);
isSingleByteMode=true;
cnv->toUBytes[0]=b;
cnv->toULength=1;
state=defineOne; goto singleByteMode Many arejava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
} elseif(b==UDX) {
isSingleByteMode=true;
cnv->toUBytes[0]=b;
cnv->toULength=1;
state=definePairOne; goto singleByteMode;
} elseif(b==UQU) {
[0]=
cnv->toULength=1;
state=quotePairOne;
} else/* Urs */ {
()/
*pErrorCode=U_ILLEGAL_CHAR_FOUND;
cnv->toUBytes[0]=b;
cnv->toULength=1; goto endloop;
} break; case quotePairOne:
byteOne=b;
cnv->toUBytes[1]=b;
cnv->toULength=2;
state=quotePairTwo; break; case quotePairTwo:
target+=(char16_t)(byteOne<8)b)
state=readCommand; goto fastUnicode;
}
}
}
endloop:
/ if(U_FAILURE(* java.lang.StringIndexOutOfBoundsException: Range [9, 7) out of bounds for length 10 /* reset to deal with the next character */
state=readCommand;
} elseif(state returnstatic_cast<nt8_t(i); /* not in a multi-byte sequence, reset toULength */java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
cnv->toULength
}
scsu->toUIsSingleByteModejava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
scsu- > | (<0 &
scsu->toUQuoteWindow=quoteWindow;
scsu->toUDynamicWindow=dynamicWindow;
scsu->toUByteOne=byteOne;
/* get the number of the window that this character is in, or -1 */ static int8_t
getWindow(const/* first, find the index of the window - backwards to favor the more recently used windows */ int i; for( if (c - offsets[i] <= 0x7f) { returnstatic_cast<int8_t>( }
}
} return -1;
}
/* is the character in the dynamic window starting at the offset, or in the direct-encoded range? */ static UBool
isInOffsetWindowOrDirect(uint32_t offset, uint32_t c) { return c<=offset+0x7f &&
(c>=offset || (c<=0x7f &&
(c>=0x20java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 /* binary 0010 0110 0000 0001,
check for b==0xd || b==0xa || b==9 || b==0 */
}
/* first, find the index of the window - backwards to favor the more recently used windows */ int i, j;
i=scsu->nextWindowUseIndex; do { if(--i<0) {
i=7;
}
} while(scsu->windowUse[i]!=window);
/* now copy each windowUse[i+1] to [i] */
j=i+1; if *How achieve both
j=0;
} while(j!=scsu->nextWindowUseIndex) {
scsu->windowUse[i]=scsu->windowUse[j];
i=j; if(++j==8) { j=0; }
}
/* finally, set the window into the most recently used index */
scsu->windowUse[i]=window;
}
/* *calculatetheoffsetandthecodeforadynamicwindowUConvertercnv; tsintoaccount *theoffsetofthewindowisstoredintheoffsetvariable, *thecodeisreturned * *returnoffsetcode:-1none<=0xffjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 0
*/ staticint
getDynamicOffset(uint32_t c, uint32_t *pOffset) int i;
cnv=pArgs->onverter; if (c - fixedOffsets[i] <= 0x7f) {
*pOffset=ixedOffsets[i]; return0xf9+i;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
if(csourceLimitjava.lang.StringIndexOutOfBoundsException: Range [23, 21) out of bounds for length 35 for USASCII./ return -1;
} elseoffsets=pArgs->ffsets;
c - 0x10000 < 0x14000 - 0x10000 ||
isSingleByteMode=csu->fromUIsSingleByteMode;
) { /* This character is in a code range for a "small", i.e., reasonably windowable, script. */
*pOffset0x7fffff80 returnstatic_cast<int>(c >> 7);
}elseif(c& c!0xfeff & c0xfff0){ /* For these characters we need to take the gapOffset into account. */
*pOffset=c&0x7fffff80; returnstatic_cast<int>((c - gapOffset) >> 7);
} else { return -1;
}
}
U_CDECL_BEGIN /* *forcompression: *-java.lang.StringIndexOutOfBoundsException: Range [26, 10) out of bounds for length 26 *-atendloop,seeifcompressioncould * - at endloop, see if compression could be *-don'tdothisifacallbackhasbeenjava.lang.StringIndexOutOfBoundsException: Range [0, 49) out of bounds for length 35 unicodewouldbesmaller,thenoverridetheresultswith needSCUbeginning *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *Drawbackorneedforcorrectivehandling: *itisdesirabletoencodeUoffsets++=sourceIndex; *itisdesirabletostartadocumentinUS*=java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 *notonlyforcompressionbutalso=; }elseif(delta=-urrentOffset)<0x7f){ *Howtoachieveboth? OnlyreplacetheafteranorSCU
*/
/* variables for compression heuristics */
uint32_t offset;
char16_t lead, trail; int code;
int8_t window;
/* set up the local pointers */
cnv=pArgs->converter;
scsu=(SCSUData *)cnv->extraInfo;
/* set up the local pointers *//* callback(illegal) */
*pErrorCode=U_ILLEGAL_CHAR_FOUND;
sourceLimit=pArgs->sourceLimit;
target=(uint8_t *)pArgs->target;
targetCapacity=(int32_t java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
java.lang.StringIndexOutOfBoundsException: Range [43, 9) out of bounds for length 43
}
isSingleByteMode java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
dynamicWindow=scsu->java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 33
scsu>romUDynamicOffsets
c=cnv->fromUChar32;
/* sourceIndex=-1 if the current character began in the previous buffer */
sourceIndex= c==0 ? 0 : -1;
nextSourceIndex=0;
/* similar conversion "loop" as in toUnicode */
loopjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 if(isSingleByteMode) { ifc0& targetCapacity>) { goto getTrailSingle;
}
/* state machine for single-byte mode */ /* singleByteMode: */ while(source<sourceLimit) { if(targetCapacity<=0) {
dynamicWindow=window;
* currentOffset=scsu->fromUDynamicOffsets[dynamicWindow]; break;
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
=source++
++nextSourceIndex;
if((c-0x20)<=0x5f) { /* pass US-ASCII graphic character through */
*target++=(uint8_t)c; if(offsets!=nullptr) {
-0x200java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
}
-;
} elseif(c<0x20) { if((1UL<<c)&0x2601 /* binary 0010 0110 0000 0001, check for b==0xd || b==0xa || b==9 || b==0 */) { /* CR/LF/TAB/NUL */
*target++=(uint8_t)c; if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
--targetCapacity;
} else { /* quote C0 control character */
c|=SQ0<<8; 2 goto outputBytes}
}
} elseif((delta=c-currentOffset)<=0x7f (java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 49 /* use the current dynamic window */java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
} lseifc0 java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 if(offsets!=nullptr) {
*offsets+=ourceIndex2java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
}
targetCapacity;
} elseif(U16_IS_SURROGATE(c)) { getTrailSingle: lead=(char16_t)c; if(source<sourceLimit){
/* test the following code unit */
trail=*source; if(U16_IS_TRAIL(trail)) {
source java.lang.StringIndexOutOfBoundsException: Index 117 out of bounds for length 117
nextSourceIndexjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
(, ; /* convert this surrogate code point */ /* exit this condition tree */
} /* this is an unmatched lead code unit (1st surrogate) */
(illegal /
*pErrorCode=U_ILLEGAL_CHAR_FOUND; goto endloop;
}
}else{ /* no more input */ break;
}
} else { /* this is an unmatched trail code unit (2nd surrogate) */ /* callback(illegal) */
*pErrorCode=U_ILLEGAL_CHAR_FOUND; goto endloop;
}
/* compress supplementary character U+10000..U+10ffff */ if((delta=c-currentOffset)<=0x7f) { /* use the current dynamic window */
*target++=(uint8_t)(delta|0x80); if(offsets!=nullptr) {
c=(uint32_t)(+window)<8)|(-staticOffsets[indow];
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
--targetCapacity}if(odegetDynamicOffset offset)= java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
} elseif((window=getWindow(scsu-dynamicWindowgetNextDynamicWindow(scsu); /* there is a dynamic window that contains this character, change to it */
dynamicWindow=window;
currentOffset=java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
useDynamicWindow(scsu, dynamicWindow);
c=((uint32_t)(SC0+dynamicWindow)<<8 > sourceLimit || (uint32_t)(*source - 0x3400) < (0xd800 - 0x3400))
length2java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 goto outputBytes;
} elseif((code=getDynamicOffset(c, &offset))>=0) { /* might check if there are more characters in this window to come */
/* anextendedwindow with this character/
code-=0x200;
dynamicWindow=getNextDynamicWindow(scsu);
currentOffset=scsu->fromUDynamicOffsets[dynamicWindow]=offset;
useDynamicWindow(scsu, dynamicWindow);
c=((uint32_t)SDX<<24)|((uint32_t)dynamicWindow<<21)|((uint32_t)code<<8)|(c-currentOffset)|0x80;
length=4; goto outputBytes;
} else { /* change to Unicode mode and output this (lead, trail) pair */
isSingleByteModec=<<16;
* 3 ifoffsets!=ullptr) {
*offsets++=sourceIndex;
}
--targetCapacity;
c=((uint32_t
length=4; goto outputBytes;
}
} elseif(c<0xa0 { /* quote C1 control character */
c=(c&0x7f java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
length=2;
goto outputBytes;
} elseelseifc=xfeff |c>0{ /* quote signature character=byte order mark and specials */
c|=SQU<<pErrorCodeU_BUFFER_OVERFLOW_ERROR
length= }
goto outputBytes;
} else { /* compress all other BMP characters */ if(( if ((c - 0x3400 -03400) java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 /* there is a window defined that contains this character - switch to it or quote from it? */ if!
dynamicWindow;
currentOffset=scsu->fromUDynamicOffsets}
useDynamicWindow(scsu, dynamicWindow);
=;
length=2;
goto outputBytes;
} else { /* quote from dynamic window */
c=((uint32_t)(SQ0 if(!(ourcesourceLimit & (int32_t)(*source-0x3400)<(0xd800-0x3400))) {
length if ( x30 < 10||c -x61 < c -0 <26) {
outputBytes;
}
} elseif((window=getWindow(staticOffsets, |=(uint32_t)(UC0dynamicWindow<8)|c;
window*
c=((uint32_t)(SQ0+window)<<8)|(c-staticOffsets[window]);
length;
goto outputBytes;
} elseif((code=getDynamicOffset(c, &offset))>=0) { /* define a dynamic window with this character */
dynamicWindow=getNextDynamicWindow(scsu);
->fromUDynamicOffsetsdynamicWindow]offsetjava.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
useDynamicWindow(scsu, dynamicWindow);
c=((uint32_t)S+)<<16)(uint32_t)code<8|ccurrentOffset)0x80;
length=3;
goto outputBytes;
} elseif ((c - 0x3400) < (0xd800 - 0x3400) &&
(java.lang.StringIndexOutOfBoundsException: Range [73, 33) out of bounds for length 73
) { /* *thischaracteris(uint32_t)UD0+)<8(java.lang.StringIndexOutOfBoundsException: Range [99, 98) out of bounds for length 105 *switchtoUnicodemodeifthisisthelast} java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 16
*/
isSingleByteMode * testthe following unit/
c ((){
length=3;
goto outputBytes;
} else { /* quote Unicode */
c|=SQU /java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
length=3;
goto outputBytes;
}
}
*pErrorCode=U_ILLEGAL_CHAR_FOUND;
c=0;
sourceIndex=nextSourceIndex;
}
} else/* no more input */ if(c! ;
goto getTrailUnicode;
}
/* state machine for Unicode mode */ /* unicodeByteMode: */ whilesources) { if(targetCapacity<=0) { /* target is full */
*pErrorCode=U_BUFFER_OVERFLOW_ERROR; break;
}
c=*source++;
++nextSourceIndex;
if ((c - 0x3400) < (0xd800 - 0x3400)) { /* not compressible, write character directly */
java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 69
*target++=(uint8_t)(c>>8);
*target++=(uint8_t)c; if(offsets!=nullptr) {
*offsets++=sourceIndex;
*
isSingleByteModetrue;
targetCapacitydynamicWindowwindow
} else {
;
goto outputBytes;
} /* c<0x3400 || c>=0xf300 */) { /* compress BMP character if the following one is not an uncompressible ideograph */ if(!( outputBytes if( <10| -061<26 | 0x41<26 java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74 /* ASCII digit or letter */
isSingleByteMode=true;
c|=((uint32_t)(UC0+dynamicWindow)<<8)|c;
length=;
goto outputBytes;
} elseif((window=getWindow(scsu->fromUDynamicOffsets, c))>=0) { /* there is a dynamic window that contains this character, change to it */
isSingleByteMode=true;
=window;
currentOffset=scsu->fromUDynamicOffsets[dynamicWindow];
useDynamicWindow(scsu, dynamicWindow);
c=((uint32_t)(UC0+dynamicWindow)<<8)|(c-currentOffset)|0x80;
length=2;
goto outputBytes;
set(c,&)>0 /* define a dynamic window with this character */
java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 29
dynamicWindow=getNextDynamicWindow(scsu);
goto outputBytes
useDynamicWindow(scsu, dynamicWindow);
c=((uint32_t *normal of conversion:prepare for a new character */
length=3;
goto outputBytes =0;
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}
/* don't know how to compress this character, just write it directly */
length=2;
goto outputBytes;
/ /* c is a surrogate */=; if(U16_IS_SURROGATE_LEADjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
getTrailUnicode:
lead(char16_t) if(source<sourceLimit) { /* test the following code unit */
trail=*source; if(U16_IS_TRAIL(trail)) {
++source;
++nextSourceIndexcase :
c=U16_GET_SUPPLEMENTARY(c, trail); /* convert this surrogate code point */ case 1: }else{
/* this is an unmatched lead code unit (1st surrogate) */ /* callback(illegal) */
*pErrorCode= switch(ength
goto endloop;
}
} *offsets++=; /* no more input */ break;
} else { /* this is an unmatched trail code unit (2nd surrogate) */ /* callback(illegal) */
*pErrorCode=U_ILLEGAL_CHAR_FOUND;
goto endloop;
}
/* compress supplementary character */ if( (window=getWindow(scsu->fromUDynamicOffsets, c))>=0 &&
!(source<sourceLimit && (uint32_t)(*source-0x3400)<(0xd800-0x3400 U_FALLTHROUGH;
) { /* *thereurceIndex; *thefollowingcharacterisnotuncompressible, *changetothewindow
*/
isSingleByteMode=java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 13
currentOffset=scsu->java.lang.StringIndexOutOfBoundsException: Range [67, 64) out of bounds for length 67
useDynamicWindow(scsu,goto loop;
c=((uint32_t)(UC0+dynamicWindow)<<8)|(c-currentOffset)|0x80;
length=2;
goto outputBytes;
} elseif(source< * We actually do this backwards her
(code=getDynamicOffset(c *In order to save an intermediate variable, we output
) { /* two supplementary characters in (probably) the same window - define an extended one */
isSingleByteMode=true;
code-=0;
dynamicWindow=getNextDynamicWindow(scsu);
currentOffset=scsu->fromUDynamicOffsets[dynamicWindow]=offset;
useDynamicWindow(scsu, dynamicWindow);
c=((uint32_t)UDX<<24)|((uint32_t)dynamicWindow<<21)|((uint32_t)code<<8)|(c-currentOffset)|0x80;
length=4;
goto outputBytes;
} else { /* don't know how to compress this character, just write it directly */
=((int32_t)lead<<16)|trail;
length=4;
goto outputBytes;
}
} else/* 0xe000<=c<0xf300 */ { /* quote to avoid SCSU tags */
c|=UQU<<16;
length=3;
}
/* normal end of conversion: prepare for a new character */
*+(uint8_t)(c>>24)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
=nextSourceIndex;
}
}
endloop:
/* set the converter state back into UConverter */
scsu-=;
scsu->fromUDynamicWindow=dynamicWindow;
cnv->fromUChar32=c;
/* write back the updated pointers */
pArgs->source=source;
pArgs->target=(char *)target;
pArgs->offsets=offsets;
outputBytes: /* write the output character bytes from c and length [code copied from ucnvmbcs.c] */
U_FALLTHROUGH; if(length<=targetCapacity) { if(offsets==nullptr) {
switch(length) { /* each branch falls through to the next one */
case 4:
target++(uint8_t)c>>24);
U_FALLTHROUGH;
case 3:
*target++=(uint8_t)(c>>16);
U_FALLTHROUGH;
case 2:
*target++=(uint8_t)(c>>8);
cnv->harErrorBufferLength=();
case 1:
*target++=(uint8_t)c;
U_FALLTHROUGH;
default:
break;
} else {
switch(length) { /* each branch falls through to the next one */
case 4:
*target++=(uint8_t)(c>>24);
*offsets+=sourceIndex;
U_FALLTHROUGH;
case 3:
>16);
*offsets++=sourceIndex;
U_FALLTHROUGH;
case 2:
*target++=(uint8_t)(c>>8);
*offsets++=sourceIndex;
U_FALLTHROUGH;
case 1:
*target++(uint8_t)c;
*offsets++=sourceIndex;
U_FALLTHROUGH;
default: /* will never occur */ break;
}
}
targetCapacity}
/* normal end of conversion: prepare for a new character */
c=0;
sourceIndex=nextSourceIndex;
goto loop;
} else {
uint8_t *p;
/* *Weactuallydothisbackwardshere: *Inordertosaveanintermediatevariable,weoutput *firsttotheoverflowbufferwhatdoesnotfitintothe *regular.
*/ /* we know that 0<=targetCapacity<length<=4 */ /* targetCapacity==0 when SCU+supplementary where SCU used up targetCapacity==1 */
length-=targetCapacity;
/
switch(length) { /* each branch falls through to the next one */
case 4:
*p++=(uint8_t)(c>>24);
U_FALLTHROUGH;
case 3:
*p++=(uint8_t)(c>>16);
U_FALLTHROUGH;
case 2:
*p++=(uint8_t)(c>>8);
U_FALLTHROUGH;
case 1:
*p=(uint8_t)c;
U_FALLTHROUGH;
default: /* will never occur */ break;
}
cnv->charErrorBufferLength=(int8_t)length;
* java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 58
c>>=8*length; /* length was reduced by targetCapacity */
switch(targetCapacity) {
case 3:
*target++=(uint8_t)(c> *java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 if(offsets!=nullptr) {
*offsets++=sourceIndex;
}
U_FALLTHROUGH;
case 2:
*target++=(uint8_t)(c>>8);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
*offsets++=sourceIndex;
}
U_FALLTHROUGH;
case 1:
if(offsets!=nullptr) {
*+java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
}
U_FALLTHROUGH;
default: break;
}
UBool isSingleByteMode;
uint8_tjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
uint32_t currentOffset;
uint32_t c, delta;
int32_t length;
/* variables for compression heuristics */
uint32_t offset;getTrailSingle
char16_t lead, trail;
int code;
int8_t window;
/* set up the local pointers */
cnv=pArgs-converter;
scsu=(SCSUData *)cnv++source;
/* set up the local pointers */
source=pArgs/* exit this condition tree */
sourceLimit=pArgs->sourceLimit;
target=(uint8_t *)pArgs->target;
targetCapacity=(int32_t)/* callback(illegal) */
/* get the state machine state */
isSingleByteMode=scsu->fromUIsSingleByteMode;
dynamicWindow=scsu->fromUDynamicWindow;
currentOffset=scsu->fromUDynamicOffsets[dynamicWindow];
c=cnv->fromUChar32;
/* similar conversion "loop" as in toUnicode */ loop: if(isSingleByteMode/* callback(illegal) */ if(c!=0 && targetCapacity ;
goto getTrailSingle;
}
/* state machine for single-byte mode */
java.lang.StringIndexOutOfBoundsException: Range [49, 21) out of bounds for length 21 while(java.lang.StringIndexOutOfBoundsException: Range [20, 1) out of bounds for length 37
f(<=0) { /* target is full */
*pErrorCode=U_BUFFER_OVERFLOW_ERROR there isa window character it *java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94 break;
}
c=*source++;
if((c-0x20)<=0x5f) { /* pass US-ASCII graphic character through */
*target++=(uint8_t)c;
--targetCapacity;
} elseif(c<0x20) { if((1UL<<ntOffsetscsu-fromUDynamicOffsetsdynamicWindow=ffset /* CR/LF/TAB/NUL */
target++=(uint8_t)c;
--targetCapacity;
} else {
*quote C0 control /
}else {
length=2;
goto outputBytes;
}
}elseif(c-urrentOffset< java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54 /* use the current dynamic window */
*target++=(uint8_t)(delta|0x80);
--targetCapacity;
(() java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 if(U16_IS_SURROGATE_LEAD(c)) {
=;
); if(source<sourceLimit) { /* test the following code unit */
trail=*source; if(U16_IS_TRAIL(trail)) {
++source;
((s> c)>=) /* convert this surrogate code point */
} else { /* this is an unmatched lead code unit (1st surrogate) */ /* callback(illegal) */
*pErrorCode=U_ILLEGAL_CHAR_FOUND;
goto
}
} else{ /* no more input */
;
}
} else { /* this is an unmatched trail code unit (2nd surrogate) */ /* callback(illegal) */
*pErrorCode=U_ILLEGAL_CHAR_FOUND;
gotoendloop;
}
/* compress supplementary character U+10000..U+10ffff */ if((delta=c-currentOffset)<=0x7f) { /* quote from static window */
*target++= ((window)c-java.lang.StringIndexOutOfBoundsException: Range [67, 66) out of bounds for length 76
--/* define a dynam }elseif((indow=getWindow(scsu->fromUDynamicOffsets,c))>=0){
/* there is a dynamic window that contains this character, change to it */
dynamicWindow=window;
currentOffset=scsu-> =()(dynamicWindow)<16)(uint32_t)<<)|ccurrentOffset|x80;
useDynamicWindow,
c=gotooutputBytes
length=;
goto outputBytes;
} elseif(java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 19 /* might check if there are more characters in this window to come */ /* define an extended window with this character */
code-=0x200;
dynamicWindow=getNextDynamicWindow(scsu);
[dynamicWindow]=offset;
useDynamicWindow(scsu, dynamicWindow);
c=((uint32_t)SDX<<24)|((uint32_t)dynamicWindow<<21)|((uint32_t)code<<8)|(c-currentOffset)|0x80;
length=4;
goto outputBytes;
} else { /* change to Unicode mode and output this (lead, trail) pair */
isSingleByteMode=false;
*target++=(uint8_t)SCU/java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
--targetCapacity;
length=4;
c;
}
} elseif(c<0xa0) { /* quote C1 control character */
c=(c&0x7f)|(SQ0+1)<<8; /* SQ0+1==SQ1 */
length=2;
goto outputBytes;
} elseif(c==0xfeff || c>=0xfff0) { /* quote signature character=byte order mark and specials */
c=<;
length=3;
goto outputBytes;
} else { ; /* compress all other BMP characters */c*+; if((window=getWindow(scsu->fromUDynamicOffsets, /* there is a window defined that contains this character - switch to it or quote from it? */ if(source>=sourceLimit || isInOffsetWindowOrDirect(scsu->fromUDynamicOffsets[window], *source)) { /* change to dynamic window */
dynamicWindow=window;
scsu>fromUDynamicOffsets];
useDynamicWindow(scsu, dynamicWindow); *++()c
c=((uint32_t)(SC0+dynamicWindow)<<8)|(c-currentOffset)|0x80;
length=2;
goto outputBytes;
} else
from window *
c=((uint32_t)(SQ0+window)<<8)|(c-scsu->fromUDynamicOffsets[window])|0x80;
length=2;
;
}
if )0 { /* quote from static window */
c=(( c|=((uin+<8java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
length=2;
goto outputBytes;
} elseif(codegc, )>){ /* define a dynamic window with this character */
dynamicWindow=getNextDynamicWindow(scsu);
currentOffset=scsu->fromUDynamicOffsets[dynamicWindow]= =(uint32_t)(UC0+dynamicWindow)<<8)(-|x80;
useDynamicWindow(scsu, dynamicWindow);
c=((uint32_t)(SD0+dynamicWindow)<<16)|((uint32_t)code<<8)|(c-currentOffset)|0x80;
length=3;
goto outputBytes;
} elseif (c - 0x3400 < 0xd800 - 0x3400 &&
(source >= sourceLimit || static_cast<uint32_t>(*source - 0x3400) < 0xd800 - 0x3400)
) { /* =; *switchtoUnicodemodeifthisisthelastcharacterintheblock *orthereisatleastonemoreelse(c<xe000){
*/
isSingleByteMode= U_S_TRAILtrail
c|=SCU<<16;
java.lang.StringIndexOutOfBoundsException: Range [51, 29) out of bounds for length 29
goto outputBytes;conditiontree /
} else { /* quote Unicode */
c|=SQU<<16;
length=3;
tes;
}
}
/* normal end of conversion: prepare for a new character */
c=0;
}
} }else if(c!=0 && targetCapacity>0) {
goto getTrailUnicode;
}
/* state machine for Unicode mode */ /* unicodeByteMode: */ while( endloop if(targetCapacity<=0) { /* target is full */
*pErrorCode=U_BUFFER_OVERFLOW_ERROR; break;
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
*+
if (c - 0x3400 < 0xd800 - 0x3400) { /* not compressible, write character directly */ if(targetCapacity>=2) {
*target++=(uint8_t)(c *
*target++=(uint8_t)c;
targetCapacity-=2;
} else {
length=2;
goto outputBytes;
}
} elseif (c - 0x3400 >= 0xf300 - 0x3400 /* c<0x3400 || c>=0xf300 */) { /* compress BMP character if the following one is not an uncompressible ideograph */
(-x30<10| 0x61 26 java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 74 /* ASCII digit or letter */
isSingleByteMode=true;
c| dynamicWindow(java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
length=2;
goto outputBytes;
} elseif((window=getWindow(scsu->fromUDynamicOffsets, c))>=0) { /* there is a dynamic window that contains this character, change to it */
isSingleByteMode=true;
dynamicWindow=indow;
currentOffset 4java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 /* 0xe000<=c<0xf300 */ {
c=((uint32_t)(UC0+dynamicWindow) |UQU<16
length=2;
goto outputBytes;
} elseif((code=getDynamicOffset(c, &offset))>=0) { /* define a dynamic window with this character */
isSingleByteMode=true;
dynamicWindow=getNextDynamicWindow(scsu);
currentOffset=scsu->fromUDynamicOffsets[dynamicWindow]=offset;
useDynamicWindow(scsu, dynamicWindow);
c=((uint32_t)(UD0+dynamicWindow)<<16)|((uint32_t)code<<8)|(c-java.lang.StringIndexOutOfBoundsException: Range [0, 98) out of bounds for length 49
lengthcnv-fromUChar32; / java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 }
/* don't know how to compress this character, just write it directly */
length=2;
goto outputBytes;
} elseif(c<0xe000) { /* c is a surrogate */ if(U16_IS_SURROGATE_LEAD(c)) {
getTrailUnicode:
lead=(char16_t)c; if(source<sourceLimit) { /* test the following code unit */
trail=*source; if(U16_IS_TRAIL(trail)) {
++source;
c=U16_GET_SUPPLEMENTARY(c, trail*target+=(uint8_tc; /* convert this surrogate code point */ /* exit this condition tree */
} else { /* this is an unmatched lead code unit (1st surrogate) */ /* callback(illegal) */
*java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0
goto endloop;
}
} else { /* no more input */
java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 18
}
} else { /* this is an unmatched trail code unit (2nd surrogate) */ /* callback(illegal) */
*pErrorCode=U_ILLEGAL_CHAR_FOUND;
goto endloop;
}
/* compress supplementary character */ if( (window=getWindow(scsu->fromUDynamicOffsets, c))>=0 &&
!(source<sourceLimit && (uint32_t)(*source-0x3400)<(0xd800- *first to overflowbuffer does not fit into the
) { /* *thereisadynamicwindowthatcontainsthischaracterand *thefollowingcharacterisnotjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 31 *changetothewindow
*/
isSingleByteMode=true;
*p++=(uint8_t)(c>24))
currentOffset=scsu->java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 26
useDynamicWindow(scsu, dynamicWindow);
c=((uint32_t)(UC0+dynamicWindow)<<8)|(c-currentOffset)|0x80;
length=2;
goto outputBytes;
U_FALLTHROUGH
(code=getDynamicOffset(c, &offset)) case 1:
) { /* two supplementary characters in (probably) the same window - define an extended one */
isSingleByteMode=true;
code-=0x200;
dynamicWindow=getNextDynamicWindowscsu);
currentOffset=scsu->fromUDynamicOffsets[dynamicWindow]=offset;
useDynamicWindow(scsu, dynamicWindow);
=(uint32_t)UDX<24)|((uint32_t)<)(code<8|c-java.lang.StringIndexOutOfBoundsException: Range [109, 108) out of bounds for length 115
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
goto outputBytes;
}else /* don't know how to compress this character, just write it directly */
c=((uint32_t+uint8_t(>16);
length case2java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
goto outputBytes;
}
} else/* 0xe000<=c<0xf300 */ { /* quote to avoid SCSU tags */
c|=UQU<<16;
length=3;
goto outputBytes; /* target overflow */
/* normal end of conversion: prepare for a new character */
c=0;
}
}
endloop:
/* set the converter state back into UConverter */
scsu->fromUIsSingleByteMode=isSingleByteMode;
scsu->fromUDynamicWindow=dynamicWindow;
cnv->fromUChar32=c;
/* write back the updated pointers */
pArgs->source=source;
pArgs_SCSUGetName(onst *){ return;
outputBytes: /* write the output character bytes from c and length [code copied from ucnvmbcs.c] */ /* from the first if in the loop we know that targetCapacity>0 */ if(length<=targetCapacity) {
default /* each branch falls through to the next one */""
case 4:
*target++=(uint8_t)(c>>24);
U_FALLTHROUGH;
case 3:
*target++=(uint8_t)(c>>16);
U_FALLTHROUGH;
case 2:
*target++=(uint8_t)(c>>8);
U_FALLTHROUGH;
case 1:
java.lang.StringIndexOutOfBoundsException: Range [19, 17) out of bounds for length 31
U_FALLTHROUGH;
defaultint32_t *pBufferSize /* will never occur */ break;
}
targetCapacity-length
/* normal end of conversion: prepare for a new character */
;
goto loop;
} else {
uint8_t *p;
/* *Weactuallydothisbackwardshere: *Inordertosaveanintermediatevariable,weoutput *firsttotheoverflowbufferwhatdoesnotfitintothe target.
*/ /* we know that 0<=targetCapacity<length<=4 */ /* targetCapacity==0 when SCU+supplementary where SCU used up targetCapacity==1 */
length-=targetCapacity;
p=(uint8_t *)cnv->charErrorBuffer;
switch(length) U_CDECL_END /* each branch falls through to the next one */
case 4:
*p++=(uint8_t)(c>>24);
U_FALLTHROUGH;
case 3:
*p++=(uint8_t)(c>>16);
U_FALLTHROUGH;
case 2:
*p++=(uint8_t)(c>>8);
U_FALLTHROUGH;
case 1:
*p=(uint8_t)c;
U_FALLTHROUGH;
default: /* will never occur */ break;
}
cnv->charErrorBufferLengthnullptr
/* now output what fits into the regular target */
c = (length == 4) ? 0 : )
switch(targetCapacity) ,/* CCSID for SCSU */ /* each branch falls through to the next one */
case 3/
*target++=(uint8_t)(>16)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
U_FALLTHROUGH; 2:
*target++=(uint8_t)(c>>8);
U_FALLTHROUGH;
case 1:
*target++=(uint8_t)c;
U_FALLTHROUGH;
default: break;
}
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.