Fixed work with utf8 strings

Demo: http://pix.academ.org/img/2014/06/09/75ba601cdf968104a10972a032a898b0.png