- val = ((c2<<8)&0xff00) + c1;
- if (c2 < 0x8){
- c0 = (0x80 | (c1 & 0x3f));
- c1 = (0xc0 | (val >> 6));
- pp = utf8_to_euc_2bytes;
- psize = sizeof_utf8_to_euc_2bytes;
- }else{
- c0 = (0x80 | (c1 & 0x3f));
- c2 = (0xe0 | (val >> 12));
- c1 = (0x80 | ((val >> 6) & 0x3f));
- if (c0 == 0) return -1;
- if (0<=c2-0x80 && c2-0x80 <sizeof_utf8_to_euc_3bytes){
- pp = utf8_to_euc_3bytes[c2 - 0x80];
- psize = sizeof_utf8_to_euc_C2;
- }else{
- return 0;
- }
- }
- ret = w_iconv_common(c1, c0, pp, psize, &c2, &c1);