[#39] Improve handling for unicode strings