Ticket #1096: Supporting multibyte strings, bugfix