<div dir="ltr"><div dir="ltr"><br><div>Thank you very much, Dick, for taking the time to answer me.</div><div><br></div><div>I have known <b><font face="monospace">tr</font></b> since a very long time, and some other means of "zapping gremlins".</div><div><br></div><div>My use case was that while modifying a file in TeXShop sometimes I unknowingly enter a control char, and I thought it would have been nice to see it without leaving TeXShop.</div><div><br></div><div>But it is not a big deal, as TeX says where the offending char is.</div><div><br></div><div>Best,</div><div><br></div><div>Guillermo</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 28 Feb 2023 at 18:53, Richard Koch <<a href="mailto:koch@uoregon.edu">koch@uoregon.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div>
Guillermo,
<div><br>
</div>
<div>Unfortunarely, your request would not be straightforward, since many features of the TeXShop Editor</div>
<div>are automatically provided by Apple's TextEdit Cocoa class, and would have to be overridden for</div>
<div>your desired feature.</div>
<div><br>
</div>
<div>A Google search revealed a Unix command = you already have which would do the</div>
<div>ttask in an easier way. Issue the command</div>
<div>
<pre style="overflow:auto;font-family:Menlo,Monaco,"Andale Mono","lucida console","Courier New",monospace;font-size:14px;background-color:rgb(254,254,252);color:rgb(88,88,88);padding:1.8em 6px 1.8em 16px;margin-bottom:1.5em;border:1px solid rgb(226,226,218);border-radius:5px;line-height:1.5em">tr -cd '\11\12\15\40-\176' < file-with-binary-chars > clean-file</pre>
</div>
<div>This command accepts a file as input and writes a second output file. It removes</div>
<div>all characters except ASCII characters with the given octal values. So it allows</div>
<div><br>
</div>
<div><span style="white-space:pre-wrap"></span>octal 11<span style="white-space:pre-wrap">
</span>trab</div>
<div><span style="white-space:pre-wrap"></span>octal 12<span style="white-space:pre-wrap">
</span>linefeed</div>
<div><span style="white-space:pre-wrap"></span>octal 15<span style="white-space:pre-wrap">
</span>carriage rerurn</div>
<div><span style="white-space:pre-wrap"></span>octal 40 rhrough octal 176</div>
<div><span style="white-space:pre-wrap"></span>all the good keyboard characters</div>
<div><br>
</div>
<div>Richard Koch</div></div></blockquote><div> </div></div></div>