fix encoding error while open() used ascii