add support for unicode and binunicode