PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Zoran_Dimov
Forum Newbie
Posts: 16 Joined: Wed Jun 21, 2006 6:10 pm
Location: Macedonia
Contact:
Post
by Zoran_Dimov » Tue Jul 11, 2006 2:51 am
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..
Weirdan
Moderator
Posts: 5978 Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine
Post
by Weirdan » Tue Jul 11, 2006 3:33 am
what encoding do you use?
Zoran_Dimov
Forum Newbie
Posts: 16 Joined: Wed Jun 21, 2006 6:10 pm
Location: Macedonia
Contact:
Post
by Zoran_Dimov » Tue Jul 11, 2006 3:38 am
I use windows-1251.
Weirdan
Moderator
Posts: 5978 Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine
Post
by Weirdan » Tue Jul 11, 2006 4:32 am
Then strlen should return proper string lengths (cp1251 is one-byte encoding).