Cartridge Return & Line Feed

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
Search

Post Reply
5 posts • Page 1 of 1
Dag-Are.Trydal@nov.com
Posts: 37
Joined: Fri Feb 26, 2016 11:52 am

Cartridge Return & Line Feed

Post by Dag-Are.Trydal@nov.com »

When saving a file (using fclose(f)) where I have used only "\\n" as newline I get CRLF in the file.
But when saving an XML (using xmlDocumentToFile(docNum,fileName)) it is saved with only LF.

Image

How can I save the XML file with both CR and LF?
Attachments
crlf.png

Gertjan van Schijndel
Posts: 634
Joined: Mon Aug 02, 2010 10:37 am

Re: Carriage Return & Line Feed

Post by Gertjan van Schijndel »

Why do you need also the carriage return in the xml file?

In your image the editor seems to also handle it without the carriage returns.

Dag-Are.Trydal@nov.com
Posts: 37
Joined: Fri Feb 26, 2016 11:52 am

Re: Cartridge Return & Line Feed

Post by Dag-Are.Trydal@nov.com »

The reason is that some service personell have to edit this settings-xml from time to time. And windows nodepad (not notepad++) displays it on one line when it is only LF.
Image
Attachments
notepad.png

Gertjan van Schijndel
Posts: 634
Joined: Mon Aug 02, 2010 10:37 am

Re: Cartridge Return & Line Feed

Post by Gertjan van Schijndel »

Could the service personnel not use wordpad (without word wrap)?

User avatar
mkoller
Posts: 741
Joined: Fri Sep 17, 2010 9:03 am

Re: Cartridge Return & Line Feed

Post by mkoller »

Following Ideas (I'm not on windows so I did not test it):

- When the personell uses WinCC_OA itself to edit the file, you could try the CTRL function textEditor() instead
- When this does not work, try using xmlDocumentToString() and then do a
f = fopen(name, "w"); fprintf(f, "%s", theString); fclose(f);
I assume this will create CRLF on windose

Post Reply
5 posts • Page 1 of 1