<p></p>
<p>Thank you for the described workaround, I'll try it on real files.</p>
<blockquote>
<p>Scintilla editing widget claims to handle illegal bytes and show them as lozenge shapes with the hex in them</p>
</blockquote>
<p>And that is exactly what is needed here and sometimes already happens with Geany's encoding detection. I only think there could be a manual way in Geany to specify "display what you can in this encoding, otherwise print illegal symbol".</p>
<blockquote>
<p>any code point 128 or greater is encoded as a sequence of <em>more than one</em> byte with a value >= 128</p>
</blockquote>
<p>I did not know that more than one byte was required in every case above 127, thank you for outlining it. But an UTF-8 buffer shoud be able to store values 128-255 with some hackery. Which might not be needed at all given the Scintilla-level solution above.</p>
<blockquote>
<p>encoding "detection" is "search for an encoding that will convert the file to UTF-8"</p>
</blockquote>
<p>Maybe that could be better emphasized in the program somehow. Also <em>Without encoding</em> is still a misleading nomenclature. Wouldn't <em>Auto-search</em> or <em>First found</em>, while still generic, be a more appropriate name?</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/2910#issuecomment-933779249">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ5L53CTQUFPJR44CB3UFH4Q7ANCNFSM5E6M3KOA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/AAIOWJ7YUZ2XTSJ2LBRN7Q3UFH4Q7A5CNFSM5E6M3KOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOG6UFOMI.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/2910#issuecomment-933779249",
"url": "https://github.com/geany/geany/issues/2910#issuecomment-933779249",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>