Page 1 of 1

How to get the length of Cyrillic string?

Posted: Tue Jul 11, 2006 2:51 am
by Zoran_Dimov
I need function that get the length of Cyrillic string. With the standard strlen() some extra characters are counted and i get big numbers.

Thanks in advance..

Posted: Tue Jul 11, 2006 3:33 am
by Weirdan
what encoding do you use?

encoding

Posted: Tue Jul 11, 2006 3:38 am
by Zoran_Dimov
I use windows-1251.

Posted: Tue Jul 11, 2006 4:32 am
by Weirdan
Then strlen should return proper string lengths (cp1251 is one-byte encoding).