Hi,

At Tue, 18 Dec 2001 16:49:08 -0500,
Richard, Francois M <[EMAIL PROTECTED]> wrote:

> If strncpy() recognizes n characters encoded in utf-8, it means that when it
> reads the bytes, leading and trailing bytes are detected/understood. There
> is some utf-8 decoding operation going on.
> In this case, why strlen() can count only bytes?

By definition, size_t means number of bytes, not number of characters.

(CJK people have treated multibyte characters by trusting strlen() returns
the number of BYTES for tens of years.)

---
Tomohiro KUBOTA <[EMAIL PROTECTED]>
http://www.debian.or.jp/~kubota/
"Introduction to I18N"  http://www.debian.org/doc/manuals/intro-i18n/
--
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/linux-utf8/

Reply via email to