--- Olivier Chapuis wrote: > [snip snip] > > So we need the function: > > USC4UTF8Length(Char32 *str): return the length of an UCS-4 string > considered as an UTF-8 string > > and also the following function will be useful (to allocate > logical_unicode_str at exact size): > > UTF8USC4Length(unsigned char *str): return the length of an utf-8 string > considered as an USC-4 string
Olivier, here's my crack at it (code sniplets attached). Feel free to modify as you see fit & do please check it. Looking forward to a working solution. Regards & thanks for your continued help. - Nadim (CC for faster responses) __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com
utf8_tofrm_ucs4.c.gz
Description: utf8_tofrm_ucs4.c.gz