Add support for utf-8 encoded OS X strings

Signed-off-by: Michal Čihař <michal@cihar.com>
Add testcase for utf-8 strings

Signed-off-by: Michal Čihař <michal@cihar.com>