XPP 220.127.116.11 - Microsoft Windows Server 2012
We updated our XPP and switched from a Linux Server to a Microsoft Windows Server. We have noticed when exporting from the Windows server, we are getting extra carriage returns in our files, which is affecting some search and replace scripts. Has anyone else noticed this happening?
About a million years ago when Unix was born, the developers figured that only the Line-Feed character was needed to end a line and start a new one.
Microsoft figured that, no, a line printer needs to know the line has ended (line feed character) AND the carriage needs to be returned to the starting point (carriage return character) so they used BOTH characters.
So, what you're seeing is that a Windows text file has CR+LF (or ^R + ^N if we're talking XPP), but Unix/Linux only has LF (^N).
I suggest the file being operated upon via scripts is cleansed of CR/^R characters first, then run the script or, obviously, update the scripts to handle either CR+LF or just LF characters.
Do you know that you can force fromxsf to use either linux or windows type of line endings?Adding either a -dos or -unix to your fromxsf command will tell XPP to use either 'windows' type or 'unix' type of line endings.I would think that in your case, it might be just as simple as adding the -unix option to the fromxsf command when you do the export.
If you are doing the export from the pathfinder interface, it might be as simple as:
Hope this is what you are looking for...
This worked perfectly Bart – Thanks for the assist!
Thanks Mark. This information is very helpful and will be passed along.