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


                       {  
                                   if  (  nremainingbytes  <  1  )                        //  not  enough  data  
                                               break;  

                                   bstr  +=  string.fromcharcode(icode  &  0x7f);  
                                   noffset  ++;  
                                   nremainingbytes  -=  1;  
                       }  
                       else  if  ((icode  &  0xe0)  ==  0xc0)            //  2  bytes  
                       {  
                                   icode1  =    strutf8.charcodeat(noffset  +  1);  
                                   if  (  nremainingbytes  <  2    ¦  ¦                                    //  not  enough  data  

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

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