How to Open and Run Python Files with UTF-8 Encoding in Jupyter Notebook?

16 Replies, 1405 Views

Thanks so much for all the suggestions, everyone! I tried the `c.ContentsManager.encoding = 'utf-8'` trick, and it seems to be working now.

I also installed `chardet` to check the encoding of my files, and turns out one of them was actually in a different encoding. Fixed that, and now everything looks good.

Quick follow-up: Does anyone know if there’s a way to force Jupyter to always use UTF-8 for new files too? Or do I have to set it manually each time?

Cheers again! You guys are lifesavers.

Messages In This Thread



Users browsing this thread: 1 Guest(s)