Fixed issue #1195: Problems with tags containing non-ascii chars