utf-8编码转换成gb2312(5)


                                   icode2  =    strutf8.charcodeat(noffset  +  2);  
                                   if  (  nremainingbytes  <  3    ¦  ¦                                    //  not  enough  data  
                                                 (icode1  &  0xc0)  !=  0x80    ¦  ¦                        //  invalid  pattern  
                                                 (icode2  &  0xc0)  !=  0x80  )  
                                   {  
                                               break;  
                                   }  

                                   bstr  +=  string.fromcharcode(((icode  &  0x0f)  <<  12)    ¦    

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/3606.html