Search code examples
eol

End of line marker in Windows virtual machine running on Mac OSX


What end of line (eoln) marker do I use if I'm running a Windows 7 virtual machine in Parallels Desktop on Mac OSX? The file is saved in a Mac directory but accessed only through Windows.


Solution

  • Windows is Windows - the newline does not change based on the physical hardware.

    The Parallels VM "emulates" (via a form of paravirtualization) the guest hardware so that Windows doesn't even "know" it's running in OS X.

    Now the 'virtual folder mapping' makes the question a bit different (as Parallels maps the folder at a higher level then the core emulation layer, IIRC) but the result is the same. Parallels does not rewrite newlines across the boundary; and Windows programs (by convention) use Windows EOLs.

    Since the application is a "windows program", I would follow the Windows EOL convention; except when such violates an existing contract or specification.