<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>28 Jul 2015 22:01:00 Z</lastBuildDate><pubDate>27 Jul 2015 08:52:00 Z</pubDate><description>Hi&#13;
A client has recently started receiving text files which contain a range of non-printing characters which we need to strip out. The exact characters vary somewhat from file to file so we need a routine to remove ASCII 1 to 31 (excluding TAB,CR &amp; LF) and 127 upwards.&#13;
&#13;
I know we could loop through for each character &amp; replace it but I'm hoping someone has a more efficient way so that we're not looping through the file 100 plus times. We have up to 30 of these files a day to deal with, up to 25Mb in size for each one.&#13;
&#13;
Thanks&#13;
&#13;
David</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53268-remove-non-printing-chars-from-text-file/read.awp</link><title>Remove non-printing chars from text file</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53268-remove-non-printing-chars-from-text-file-53307/read.awp</comments><pubDate>28 Jul 2015 22:01:00 Z</pubDate><description>Hi Peter&#13;
The project is in WD17 &amp; that construct throws a syntax error in it. It does work fine in WD20 though so it's either t…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53268-remove-non-printing-chars-from-text-file-53307/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53268-remove-non-printing-chars-from-text-file-53307/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53268-remove-non-printing-chars-from-text-file/read.awp">Remove non-printing chars from text file</source><title>Re: Remove non-printing chars from text file</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53268-remove-non-printing-chars-from-text-file-53293/read.awp</comments><pubDate>28 Jul 2015 11:34:00 Z</pubDate><description>you can put it in hex format using BufferToHexa, convert every byte to int using HexaToInt and remove it if the values is in you…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53268-remove-non-printing-chars-from-text-file-53293/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53268-remove-non-printing-chars-from-text-file-53293/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53268-remove-non-printing-chars-from-text-file/read.awp">Remove non-printing chars from text file</source><title>Re: Remove non-printing chars from text file</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53268-remove-non-printing-chars-from-text-file-53291/read.awp</comments><pubDate>28 Jul 2015 10:57:00 Z</pubDate><description>Me too; I use the Replace function to remove white-space from strings - no problem.</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53268-remove-non-printing-chars-from-text-file-53291/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53268-remove-non-printing-chars-from-text-file-53291/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53268-remove-non-printing-chars-from-text-file/read.awp">Remove non-printing chars from text file</source><title>Re: Remove non-printing chars from text file</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53268-remove-non-printing-chars-from-text-file-53289/read.awp</comments><pubDate>28 Jul 2015 09:30:00 Z</pubDate><description>Hi David,&#13;
&#13;
I tested it in WD20 with this piece of code and for me it works. The length of the initial string is 3 and the leng…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53268-remove-non-printing-chars-from-text-file-53289/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53268-remove-non-printing-chars-from-text-file-53289/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53268-remove-non-printing-chars-from-text-file/read.awp">Remove non-printing chars from text file</source><title>Re: Remove non-printing chars from text file</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53268-remove-non-printing-chars-from-text-file-53288/read.awp</comments><pubDate>27 Jul 2015 20:46:00 Z</pubDate><description>Hi Peter&#13;
Clever idea but no good I'm afraid:(&#13;
&#13;
David</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53268-remove-non-printing-chars-from-text-file-53288/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53268-remove-non-printing-chars-from-text-file-53288/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53268-remove-non-printing-chars-from-text-file/read.awp">Remove non-printing chars from text file</source><title>Re: Remove non-printing chars from text file</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53268-remove-non-printing-chars-from-text-file-53281/read.awp</comments><pubDate>27 Jul 2015 09:55:00 Z</pubDate><description>Hi David,&#13;
&#13;
Not tested, but this should do the trick I guess:&#13;
CleanString is string = Replace(InitialString, [charact(1), char…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53268-remove-non-printing-chars-from-text-file-53281/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53268-remove-non-printing-chars-from-text-file-53281/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53268-remove-non-printing-chars-from-text-file/read.awp">Remove non-printing chars from text file</source><title>Re: Remove non-printing chars from text file</title></item></channel></rss>
