LoginSignup
1
0

More than 5 years have passed since last update.

gnsync@geeknoteで日本語表示できなくなっちゃった

Last updated at Posted at 2014-03-19

strip unprintable charactersをコメントアウト
日本語はprintableじゃないのか。。

    def _get_file_content(self, path):
        """
        Get file content.
        """
        content = open(path, "r").read()

        # strip unprintable characters
        # content = ''.join(s for s in content if s in string.printable)

        content = editor.textToENML(content=content, raise_ex=True, format=self.format)

        if content is None:
            logger.warning("File {0}. Content must be " \
                           "an UTF-8 encode.".format(path))
            return None

        return content
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0