On 2017-09-04 02:01 AM, lep42 wrote:<br>
> Hello,<br>
> I Use french font caracteres, my WM locale is defined like fr_FR.utf8.<br>
> <br>
> When selecting characters  on  "none" encoded document  or ISO8859-1<br>
> the accented characters counts for two byte instead of on.<br>
> <br>
> exemple: create a document  type "é" caracter<br>
> and select it<br>
> <br>
<br>
Hi,<br>
<br>
Even though the character can be represented in one byte (in UTF-8 or <br>
ISO 8859-1), Geany converts to UTF-8 for in-memory representation, and <br>
then it must do some processing (ex. normalization) causing it to get <br>
split out into the standalone e and the combining diacritical mark  ́. <br>
This is my guess.<br>
<br>
That still doesn't explain why Geany shows 2 characters selected, the <br>
reason for that is likely that Geany[0] uses very naive byte-based code <br>
for the selection count rather than the number of glyphs selected.<br>
<br>
Regards,<br>
Matthew Brush<br>
<br>
[0]: and/or Scintilla, the widget which provides the editor <br>
buffer/manipulations/information.<br>


<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/1599#issuecomment-326916481">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ_x85y0pyblV6VwMGT_7Ap9gfjgJks5se8UrgaJpZM4PLpA6">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ9TbjdLS8aI8mGrEDnxbZbhRlsiVks5se8UrgaJpZM4PLpA6.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/issues/1599#issuecomment-326916481"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@codebrainz in #1599: On 2017-09-04 02:01 AM, lep42 wrote:\n\u003e Hello,\n\u003e I Use french font caracteres, my WM locale is defined like fr_FR.utf8.\n\u003e \n\u003e When selecting characters  on  \"none\" encoded document  or ISO8859-1\n\u003e the accented characters counts for two byte instead of on.\n\u003e \n\u003e exemple: create a document  type \"é\" caracter\n\u003e and select it\n\u003e \n\nHi,\n\nEven though the character can be represented in one byte (in UTF-8 or \nISO 8859-1), Geany converts to UTF-8 for in-memory representation, and \nthen it must do some processing (ex. normalization) causing it to get \nsplit out into the standalone e and the combining diacritical mark  ́. \nThis is my guess.\n\nThat still doesn't explain why Geany shows 2 characters selected, the \nreason for that is likely that Geany[0] uses very naive byte-based code \nfor the selection count rather than the number of glyphs selected.\n\nRegards,\nMatthew Brush\n\n[0]: and/or Scintilla, the widget which provides the editor \nbuffer/manipulations/information.\n"}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/1599#issuecomment-326916481"}}}</script>