strlen and 8-bit characters

strlen thinks 8bit characters is 2 bytes …that never happends with gcc
in other operating systems …like
linux or MS

This is probably because in UTF encoding the most significant bit
indicates that there is a second byte. Basically, you can’t have 8-bit
characters at all. Either 7-bit ASCII or multibyte sequence (up to 6
bytes I believe).

This should of course depend on locale, but their libc doesn’t really
support locales. Nor it supports wide-char operations fully. That sucks
obviously, but probably won’t be changed until they switch to Dinkumware
C/C++ library.

  • igor

hehe wrote:

strlen thinks 8bit characters is 2 bytes …that never happends with gcc
in other operating systems …like
linux or MS