ipyrmd icon indicating copy to clipboard operation
ipyrmd copied to clipboard

Adding encoding

Open SeanAmmirati opened this issue 7 years ago • 1 comments

SeanAmmirati avatar Sep 28 '18 02:09 SeanAmmirati

Adding encoding specifications to force UTF-8 by default, and allows for additional encoding schemes to be specified in command line.

This was done because I initially tried to run this on a Windows machine but it would not run since the default encoding was CP-1252 rather than UTF-8, which resulted in an empty file for old Rmarkdown scripts (apparently, R-markdown scripts from other computers/the cloud can only be opened as UTF-8, not too sure if I'm right about this but this was the problem I was facing.) I changed the encoding to UTF-8 and it worked, so I figured I'd default this functionality and add it here in case other users face the same issue.

Not sure how (or if) ipython notebooks can even use another encoding scheme based on the code here, so I'm not sure how useful the encode option will be, but I added it for completeness.

Thanks!

SeanAmmirati avatar Sep 28 '18 03:09 SeanAmmirati