¡@

Home 

c++ Programming Glossary: is_in_range

How do I read UTF-8 characters via a pointer?

http://stackoverflow.com/questions/2948308/how-do-i-read-utf-8-characters-via-a-pointer

it you have to use an unsigned int long instead ie #define IS_IN_RANGE c f l c f c l u_long readNextChar char p TODO since UTF 8 is.. return u_long 1 switch seqlen case 2 c1 ptr 0 if IS_IN_RANGE c1 0xC2 0xDF malformed data do something return u_long 1.. u_long 1 break case 3 c1 ptr 0 c2 ptr 1 if c1 0xE0 IS_IN_RANGE c2 0xA0 0xBF c1 0xED IS_IN_RANGE c2 0x80 0x9F IS_IN_RANGE..