Fixed bug in parsing unicode strings

* Added tests