Fixed error on print with non-ascii characters.