fixed handling of strange unicode characters