dmpizzle Posted January 10, 2009 Report Share Posted January 10, 2009 I'm having an issue where I'm writing to a file on the Mac with "Write to Text File". It looks like the platform-dependent way Labview is choosing to write each line is with a Carriage Return. If I open the file from Textedit, everything looks great. However, if I open the file from Terminal using "vi" or "cat", then I see a ton of ^Ms in the file and there are no newlines. I believe ^M is a Carriage Return whereas I want to view the file in Linux with only Line Feeds. Anyone know what I would have to do to fix this? Thanks in advance. -dmp Quote Link to comment
Rolf Kalbermatter Posted January 15, 2009 Report Share Posted January 15, 2009 QUOTE (dmpizzle @ Jan 9 2009, 04:28 PM) I'm having an issue where I'm writing to a file on the Mac with "Write to Text File". It looks like the platform-dependent way Labview is choosing to write each line is with a Carriage Return.If I open the file from Textedit, everything looks great. However, if I open the file from Terminal using "vi" or "cat", then I see a ton of ^Ms in the file and there are no newlines. I believe ^M is a Carriage Return whereas I want to view the file in Linux with only Line Feeds. Anyone know what I would have to do to fix this? Thanks in advance. -dmp The LabVIEW Text Write function node has a mode selection (right click pop-up menu) called "Convert EOL". When activated the function will convert each instance of LF, CR, or LF/CR into the end of line identifier for the current platform. Each platform has its own native EOL with Mac using a CR, Unix a LF and Windows CR/LF. And I think that LabVIEW for Mac OS X still uses the CR as it is really a Carbon application despite the underlying Unix kernel. When you want to write a text with specific EOL you have to format it accordingly and disable above mentioned option in the Write Text function. Rolf Kalbermatter Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.