added explicit unicode handling