Hi, This is on z/OS and perl-5.8.6. -------------------------------------- U8 u, *s;
1: s++; 2: u &= ((len >= 6) ? 0x01 : (0x1F >> (len-2))); 3: uv = (((u) << 5)|(PL_e2utf[(U8)(*s)] & ((U8)0x1f))); --------------------------------------- Before starting, s is set to "\x8a\x41" (utf-ebcdic bytes equivalent to code point 192), u is set to "\x8a" and len is set to 2 (no. of bytes in s). After completing line 3, u = \x0a, and uv = 320. Is there a way to get uv = 192 (\xC0) by modifying the logic in lines 2 and 3 ? Thanks in advance, Rajarshi. __________________________________ Discover Yahoo! Find restaurants, movies, travel and more fun for the weekend. Check it out! http://discover.yahoo.com/weekend.html