1

I have been given a set of python codes (.py) which were written on Mac. Unfortunately, when I open them on windows (pycharm, notepad, even word), there are no line breaks. I asked for .txt versions of the file, but the problem persists, likely since Max/Unix and Windows use different newline characters.

Is there a way I can fix this without needing access to Mac/Unix?

1 Answer 1

2

Save the files in utf-8 encoding to solve your problem with newlines. On a Mac you could use Atom, and on Windows you could use Atom or Notepad++.

1
  • In the end, the other teammate had to repair their files, as there were no newline characters at all, so I could not fix it. Still accepting the answer for future reference for other users.
    – safex
    Commented Mar 21, 2021 at 13:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .