亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? xmlutf8transcoder390.cpp

?? IBM的解析xml的工具Xerces的源代碼
?? CPP
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
                break;            case 2 :                // UTF-8:   [1110 zzzz] [10yy yyyy] [10xx xxxx]                // Unicode: [zzzz yyyy] [yyxx xxxx]                //                if (( *srcPtr == 0xE0) && ( *(srcPtr+1) < 0xA0))                 {                    char byte0[2] = {*srcPtr    ,0};                    char byte1[2] = {*(srcPtr+1),0};                    ThrowXMLwithMemMgr2(UTFDataFormatException                                      , XMLExcepts::UTF8_Invalid_3BytesSeq                                      , byte0                                      , byte1                                      , getMemoryManager());                }                checkTrailingBytes(*(srcPtr+1), 2, 1);                checkTrailingBytes(*(srcPtr+2), 2, 2);                //                // D36 (a) UTF-8 is the Unicode Transformation Format that serializes                 //         a Unicode code point as a sequence of one to four bytes,                 //         as specified in Table 3.1, UTF-8 Bit Distribution.                //     (b) An illegal UTF-8 code unit sequence is any byte sequence that                 //         does not match the patterns listed in Table 3.1B, Legal UTF-8                 //         Byte Sequences.                //     (c) An irregular UTF-8 code unit sequence is a six-byte sequence                 //         where the first three bytes correspond to a high surrogate,                 //         and the next three bytes correspond to a low surrogate.                 //         As a consequence of C12, these irregular UTF-8 sequences shall                 //         not be generated by a conformant process.                 //                //irregular three bytes sequence                // that is zzzzyy matches leading surrogate tag 110110 or                 //                       trailing surrogate tag 110111                // *srcPtr=1110 1101                 // *(srcPtr+1)=1010 yyyy or                 // *(srcPtr+1)=1011 yyyy                //                // 0xED 1110 1101                // 0xA0 1010 0000                if ((*srcPtr == 0xED) && (*(srcPtr+1) >= 0xA0))                {                    char byte0[2] = {*srcPtr,    0};                    char byte1[2] = {*(srcPtr+1),0};                     ThrowXMLwithMemMgr2(UTFDataFormatException                              , XMLExcepts::UTF8_Irregular_3BytesSeq                              , byte0                              , byte1                              , getMemoryManager());                }                tmpVal = *srcPtr++;                tmpVal <<= 6;                tmpVal += *srcPtr++;                tmpVal <<= 6;                tmpVal += *srcPtr++;                break;            case 3 :                 // UTF-8:   [1111 0uuu] [10uu zzzz] [10yy yyyy] [10xx xxxx]*                // Unicode: [1101 10ww] [wwzz zzyy] (high surrogate)                //          [1101 11yy] [yyxx xxxx] (low surrogate)                //          * uuuuu = wwww + 1                //                if (((*srcPtr == 0xF0) && (*(srcPtr+1) < 0x90)) ||                    ((*srcPtr == 0xF4) && (*(srcPtr+1) > 0x8F))  )                {                    char byte0[2] = {*srcPtr    ,0};                    char byte1[2] = {*(srcPtr+1),0};                    ThrowXMLwithMemMgr2(UTFDataFormatException                                      , XMLExcepts::UTF8_Invalid_4BytesSeq                                      , byte0                                      , byte1                                      , getMemoryManager());                }                checkTrailingBytes(*(srcPtr+1), 3, 1);                checkTrailingBytes(*(srcPtr+2), 3, 2);                checkTrailingBytes(*(srcPtr+3), 3, 3);                                tmpVal = *srcPtr++;                tmpVal <<= 6;                tmpVal += *srcPtr++;                tmpVal <<= 6;                tmpVal += *srcPtr++;                tmpVal <<= 6;                tmpVal += *srcPtr++;                break;            default: // trailingBytes > 3                /***                 * The definition of UTF-8 in Annex D of ISO/IEC 10646-1:2000 also allows                  * for the use of five- and six-byte sequences to encode characters that                  * are outside the range of the Unicode character set; those five- and                  * six-byte sequences are illegal for the use of UTF-8 as a transformation                  * of Unicode characters. ISO/IEC 10646 does not allow mapping of unpaired                  * surrogates, nor U+FFFE and U+FFFF (but it does allow other noncharacters).                 ***/                char len[2]  = {(char)(trailingBytes+0x31), 0};                char byte[2] = {*srcPtr,0};                ThrowXMLwithMemMgr2(UTFDataFormatException                                  , XMLExcepts::UTF8_Exceede_BytesLimit                                  , byte                                  , len                                  , getMemoryManager());                break;        }        // since trailingBytes comes from an array, this logic is redundant        //  default :        //      ThrowXML(TranscodingException, XMLExcepts::Trans_BadSrcSeq);        //}        tmpVal -= gUTFOffsets[trailingBytes];        //        //  If it will fit into a single char, then put it in. Otherwise        //  encode it as a surrogate pair. If its not valid, use the        //  replacement char.        //        if (!(tmpVal & 0xFFFF0000))        {            *sizePtr++ = trailingBytes + 1;            *outPtr++ = XMLCh(tmpVal);        }         else if (tmpVal > 0x10FFFF)        {            //            //  If we've gotten more than 32 chars so far, then just break            //  out for now and lets process those. When we come back in            //  here again, we'll get no chars and throw an exception. This            //  way, the error will have a line and col number closer to            //  the real problem area.            //            if ((outPtr - toFill) > 32)                break;            ThrowXMLwithMemMgr(TranscodingException, XMLExcepts::Trans_BadSrcSeq, getMemoryManager());        }         else        {            //            //  If we have enough room to store the leading and trailing            //  chars, then lets do it. Else, pretend this one never            //  happened, and leave it for the next time. Since we don't            //  update the bytes read until the bottom of the loop, by            //  breaking out here its like it never happened.            //            if (outPtr + 1 >= outEnd)                break;            // Store the leading surrogate char            tmpVal -= 0x10000;            *sizePtr++ = trailingBytes + 1;            *outPtr++ = XMLCh((tmpVal >> 10) + 0xD800);            //            //  And then the trailing char. This one accounts for no            //  bytes eaten from the source, so set the char size for this            //  one to be zero.            //            *sizePtr++ = 0;            *outPtr++ = XMLCh((tmpVal & 0x3FF) + 0xDC00);        }    }    // Update the bytes eaten    bytesEaten = srcPtr - srcData;    // Return the characters read    return outPtr - toFill;}unsigned intXMLUTF8Transcoder390::transcodeTo( const   XMLCh* const    srcData                                , const unsigned int    srcCount                                ,       XMLByte* const  toFill                                , const unsigned int    maxBytes                                ,       unsigned int&   charsEaten                                , const UnRepOpts       options){    // Watch for pathological scenario. Shouldn't happen, but...    if (!srcCount || !maxBytes)        return 0;    //    //  Get pointers to our start and end points of the input and output    //  buffers.    //    const XMLCh*    srcPtr = srcData;    const XMLCh*    srcEnd = srcPtr + srcCount;    XMLByte*        outPtr = toFill;    XMLByte*        outEnd = toFill + maxBytes;    while (srcPtr < srcEnd)    {        //        //  Tentatively get the next char out. We have to get it into a        //  32 bit value, because it could be a surrogate pair.        //        XMLUInt32 curVal = *srcPtr;        //        //  If its a leading surrogate, then lets see if we have the trailing        //  available. If not, then give up now and leave it for next time.        //        unsigned int srcUsed = 1;        if ((curVal >= 0xD800) && (curVal <= 0xDBFF))        {            if (srcPtr + 1 >= srcEnd)                break;            // Create the composite surrogate pair            curVal = ((curVal - 0xD800) << 10)                    + ((*(srcPtr + 1) - 0xDC00) + 0x10000);            // And indicate that we ate another one            srcUsed++;        }        // Figure out how many bytes we need        unsigned int encodedBytes;        if (curVal < 0x80)            encodedBytes = 1;        else if (curVal < 0x800)            encodedBytes = 2;        else if (curVal < 0x10000)            encodedBytes = 3;        else if (curVal < 0x110000)            encodedBytes = 4;        else        {            // If the options say to throw, then throw            if (options == UnRep_Throw)            {                XMLCh tmpBuf[17];                XMLString::binToText(curVal, tmpBuf, 16, 16, getMemoryManager());                ThrowXMLwithMemMgr2                (                    TranscodingException                    , XMLExcepts::Trans_Unrepresentable                    , tmpBuf                    , getEncodingName()                    , getMemoryManager()                );            }            // Else, use the replacement character            *outPtr++ = chSpace;            srcPtr += srcUsed;            continue;        }        //        //  If we cannot fully get this char into the output buffer,        //  then leave it for the next time.        //        if (outPtr + encodedBytes > outEnd)            break;        // We can do it, so update the source index        srcPtr += srcUsed;        //        //  And spit out the bytes. We spit them out in reverse order        //  here, so bump up the output pointer and work down as we go.        //        outPtr += encodedBytes;        switch(encodedBytes)        {            case 6 : *--outPtr = XMLByte((curVal | 0x80UL) & 0xBFUL);                     curVal >>= 6;            case 5 : *--outPtr = XMLByte((curVal | 0x80UL) & 0xBFUL);                     curVal >>= 6;            case 4 : *--outPtr = XMLByte((curVal | 0x80UL) & 0xBFUL);                     curVal >>= 6;            case 3 : *--outPtr = XMLByte((curVal | 0x80UL) & 0xBFUL);                     curVal >>= 6;            case 2 : *--outPtr = XMLByte((curVal | 0x80UL) & 0xBFUL);                     curVal >>= 6;            case 1 : *--outPtr = XMLByte                     (                        curVal | gFirstByteMark[encodedBytes]                     );        }        // Add the encoded bytes back in again to indicate we've eaten them        outPtr += encodedBytes;    }    // Fill in the chars we ate    charsEaten = (srcPtr - srcData);    // And return the bytes we filled in    return (outPtr - toFill);}bool XMLUTF8Transcoder390::canTranscodeTo(const unsigned int toCheck) const{    // We can represent anything in the Unicode (with surrogates) range    return (toCheck <= 0x10FFFF);}XERCES_CPP_NAMESPACE_END

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品午夜在线| 91国产视频在线观看| 欧美一区二区人人喊爽| 日韩二区三区在线观看| 91精品国产91综合久久蜜臀| 日韩成人免费电影| 久久新电视剧免费观看| 丁香五精品蜜臀久久久久99网站| 日本一区二区电影| 日本久久电影网| 日韩影院在线观看| 久久新电视剧免费观看| hitomi一区二区三区精品| 一区二区三区在线免费视频| 欧美日韩国产精品自在自线| 麻豆精品一区二区| 久久九九久精品国产免费直播| jlzzjlzz亚洲女人18| 亚洲成人tv网| 日韩一区二区三免费高清| 韩日精品视频一区| 18欧美亚洲精品| 欧美精品久久99| 国产一级精品在线| 亚洲人xxxx| 日韩午夜精品电影| 91香蕉视频黄| 美女高潮久久久| 亚洲男人天堂av网| 欧美成人video| 99精品一区二区三区| 日韩中文字幕亚洲一区二区va在线| 精品福利在线导航| 一本到不卡免费一区二区| 麻豆91免费观看| 亚洲私人黄色宅男| 欧美成人乱码一区二区三区| www.66久久| 久久99国产精品久久99 | 视频一区二区三区中文字幕| 久久综合久久综合久久综合| 色94色欧美sute亚洲13| 精品亚洲成a人| 亚洲午夜久久久久久久久电影网 | 国产成人av网站| 亚洲地区一二三色| 国产精品美女久久久久av爽李琼| 欧美一区二区三区四区五区 | 国产成都精品91一区二区三| 亚洲一区二区三区四区五区中文 | 麻豆国产一区二区| 亚洲精品视频免费看| 亚洲精品一区二区三区精华液| 91福利在线观看| 成人激情免费视频| 久久国产麻豆精品| 婷婷久久综合九色综合绿巨人| 国产精品不卡在线观看| 26uuu另类欧美亚洲曰本| 欧美精品一级二级| 色狠狠色狠狠综合| 一本色道久久综合精品竹菊| 成人av影视在线观看| 国产一区二区0| 精久久久久久久久久久| 日本不卡的三区四区五区| 香蕉久久夜色精品国产使用方法| 亚洲免费在线观看视频| 综合亚洲深深色噜噜狠狠网站| 国产亚洲福利社区一区| 久久久美女艺术照精彩视频福利播放| 8v天堂国产在线一区二区| 欧美伊人久久久久久久久影院| 91免费观看视频| 91香蕉视频污| 日本道在线观看一区二区| 91丨九色丨蝌蚪丨老版| 99国产欧美另类久久久精品| 99久久综合99久久综合网站| 99re热这里只有精品免费视频| 成人精品鲁一区一区二区| 成人综合婷婷国产精品久久| 国产成人精品www牛牛影视| 国产精品一区在线观看你懂的| 国产在线精品视频| 国产成人在线网站| av在线一区二区| av在线免费不卡| 在线观看免费视频综合| 欧美精品乱人伦久久久久久| 6080日韩午夜伦伦午夜伦| 欧美一级高清片在线观看| 欧美电影免费观看高清完整版| 精品国精品国产| 国产午夜一区二区三区| 国产精品初高中害羞小美女文| 一区二区三区不卡在线观看 | 日韩三级电影网址| 久久日一线二线三线suv| 国产欧美日韩在线| 成人欧美一区二区三区黑人麻豆| 亚洲品质自拍视频| 免费在线观看日韩欧美| 国产老肥熟一区二区三区| av在线不卡电影| 欧美日韩国产综合视频在线观看| 日韩欧美一级特黄在线播放| 国产午夜久久久久| 一个色在线综合| 久久av中文字幕片| 99精品1区2区| 日韩精品一区二| 日韩毛片视频在线看| 五月天亚洲精品| 国产成人午夜精品5599| 欧美视频你懂的| 久久久久久久久久久99999| 一区二区三区国产精品| 九九九精品视频| 色狠狠一区二区三区香蕉| 欧美成人一级视频| 亚洲人被黑人高潮完整版| 另类小说图片综合网| 99国产欧美另类久久久精品| 日韩一区二区三区视频| 亚洲欧洲精品一区二区三区 | 久久综合久久99| 亚洲精品国产成人久久av盗摄 | 亚洲不卡在线观看| 国产成人免费在线观看不卡| 精品视频免费在线| 国产亚洲成aⅴ人片在线观看| 午夜欧美在线一二页| 成人avav在线| 精品国产乱码久久久久久浪潮| 亚洲精品国久久99热| 国产在线国偷精品产拍免费yy| 欧美色倩网站大全免费| 国产精品免费aⅴ片在线观看| 免费成人美女在线观看| 色婷婷精品大视频在线蜜桃视频| 精品动漫一区二区三区在线观看| 亚洲一卡二卡三卡四卡无卡久久 | 制服丝袜亚洲网站| 亚洲欧美综合色| 国内精品不卡在线| 日韩亚洲欧美在线观看| 一区二区三区在线不卡| 成人性生交大片免费看在线播放| 欧美一区二区人人喊爽| 亚洲国产乱码最新视频| 91麻豆6部合集magnet| 日本一区二区综合亚洲| 美洲天堂一区二卡三卡四卡视频| 欧洲av在线精品| 亚洲精品国产精华液| 9久草视频在线视频精品| 国产婷婷色一区二区三区| 九九视频精品免费| 欧美va亚洲va在线观看蝴蝶网| 视频一区中文字幕| 欧美区在线观看| 日韩高清不卡一区二区三区| 精品视频一区三区九区| 亚洲国产综合色| 精品视频1区2区| 亚洲福利一区二区| 欧美日韩精品一区视频| 亚洲午夜久久久久久久久电影网 | 国产99精品国产| 久久久久久黄色| 风间由美一区二区av101| 国产婷婷色一区二区三区四区| 懂色一区二区三区免费观看| 久久久国际精品| 成人国产视频在线观看| 中文字幕一区在线观看| 色婷婷激情一区二区三区| 亚洲电影激情视频网站| 欧美久久久久久蜜桃| 久久99国内精品| 日本一区二区三区高清不卡| 成人av电影免费观看| 亚洲一级二级在线| 91精品国产综合久久久久久| 久久国产精品免费| 国产精品情趣视频| 在线一区二区视频| 丝袜亚洲另类丝袜在线| 精品国产一区二区三区久久影院 | 欧美性大战久久久久久久蜜臀| 亚洲午夜一区二区三区| 91精品国产色综合久久不卡电影| 看电视剧不卡顿的网站| 国产精品久久久久久妇女6080| 91国产福利在线| 麻豆视频一区二区| 国产精品第13页| 337p亚洲精品色噜噜| 国产成人aaa|