<p></p>
<p><a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/mdziczkowski/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mdziczkowski">@mdziczkowski</a> my comment was in response to your "The problem is that I'm unable to open this file as UTF-8 because there is no possibility to choose the encoding of the opened file in the "file open" dialog" pointing out that you can in fact choose the encoding to read the file in the open dialog instead of Geany using heuristics to decide the encoding to read the file.  Heuristics can be wrong.</p>
<p>As <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/codebrainz/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/codebrainz">@codebrainz</a> said, the Geany buffer is always UTF-8, the open dialog gives you the choice to select the encoding of the file which is converted into UTF-8 in the buffer, and you can add any UTF-8 character to the buffer.</p>
<p>Looking at your OP, perhaps you meant the "File Save" dialog?  In which case you are correct, the selection is not in the save dialog, the setting in <code>Menu->Document->Set Encoding</code> sets the encoding to write the UTF-8 from the buffer to the file.  It defaults to the encoding used to read the file into the buffer but can be changed by the user.</p>
<p>As <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/codebrainz/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/codebrainz">@codebrainz</a> said, if the encoding at <code>Menu->Document->Set Encoding</code> cannot encode a character in the buffer you will get the error in your OP.  He suggested you select ISO-8859-2 which contains the character you added, or UTF-8 to be able to save any character Geany can add to the buffer.</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/2542#issuecomment-653744617">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ4GSSI32MWEFZA43PLRZ3ZWRANCNFSM4OPCZVUQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAIOWJ2YPWWQDVBTDOMA2F3RZ3ZWRA5CNFSM4OPCZVU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOE33VT2I.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/2542#issuecomment-653744617",
"url": "https://github.com/geany/geany/issues/2542#issuecomment-653744617",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>