fix unicode error with japanese LANG (fix #578)