Make sure non-ascii text is handled correctly #10649