Added support for unicode (Fixed invalid cast to char)