<p></p>
<p>I usually just want to peak into binary files to look what readable strings are in there, I never write them.<br>
In order to open them, I just trow away the NULL-Characters in a temporary file and open that one.</p>
<p>Maybe Geany could ask to open it - read only - without the NULL-Characters? Asking the user what to do would also solve <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="365875311" data-permission-text="Title is private" data-url="https://github.com/geany/geany/issues/1966" data-hovercard-type="issue" data-hovercard-url="/geany/geany/issues/1966/hovercard" href="https://github.com/geany/geany/issues/1966">#1966</a> imho.</p>
<p>Workaround (Ubuntu):</p>
<pre><code>#!/bin/bash
# This script takes one parameter as input, replaces all NULL-Characters with "_"
# then saves that into a temporary file, open geany and delete that file directly
tempfile="$(mktemp)"
cat $1 | tr "\0" _ > $tempfile
geany $tempfile
rm $tempfile
</code></pre>
<p>Save it as <code>geany-null-safe.sh</code>and make it executable (<code>chmod +x geany-null-safe.sh</code>).<br>
Use like this:<br>
<code>./geany-null-safe.sh some-binary-file.pdf </code></p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/618#issuecomment-626568229">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ4B7V4WNAKHHTU3UULRQ64SXANCNFSM4BN5PDWA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAIOWJ7QAFSVITOFO4D7DH3RQ64SXA5CNFSM4BN5PDWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEVMKYJI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/issues/618#issuecomment-626568229",
"url": "https://github.com/geany/geany/issues/618#issuecomment-626568229",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>