November 17th, 2012, 04:40 PM
Problem with mb_substr and length?
Hello, I use the mb_substr for cyrillic language(multi-byte chars) to prevend the text to get out of the div space I put it in.But when I use numbers and punctuation of the text length varies due to differences in the length of the non-Cyrillic characters. How can you make the text to be the same length? Is it possible revision of the text to identify the length of characters in the same way?
November 17th, 2012, 05:01 PM
What encoding are you using? I believe you need cp1251 to get 1 byte encoding so that the right values are returned for Cyrillic characters.
There are 10 kinds of people in the world. Those that understand binary and those that don't.
November 18th, 2012, 01:35 AM
I'm using UTF-8(also database is UTF-8),but i'll test it with cp1251.Thanks for the suggestion I didn't know that cp1251 will make the cyrillic chars to 1 byte.
Originally Posted by gw1500se
EDIT:I decided to go with max-height and overflow:hidden coz remaking the whole site to cp1251 will be pain in the a**.