Note that there are some explanatory texts on larger screens.

plurals
  1. POUnicode characters messed up after linebreak
    primarykey
    data
    text
    <p>Certain combinations of Unicode characters seem to be problematic. I'll show you what I mean using Notepad++.</p> <ol> <li>Create a new text file in Notepad++ and change the encoding to UTF-8 (BOM doesn't matter).</li> <li>Copy and paste the following four arrows: ↑↓↙↘. This should look like fine (see first image below).</li> <li>Now insert a newline after the second arrow (Windows/Unix doesn't matter). Now the first line still looks fine, <em>but the arrows in the second line are replaced by placeholder boxes</em> (see second image below).</li> <li>Saving and reopening makes no difference. Still boxes in the second line. Remove the linebreak, and everything looks fine again.</li> </ol> <p>This problem isn't exclusive to Notepad++. Other programs also show garbage when loading the text file with a linebreak. Surprisingly, the standard Windows Notepad displays it just fine.</p> <p>This is the working file, once in hex and once within Notepad++:</p> <pre><code>E2 86 91 E2 86 93 E2 86 99 E2 86 98 </code></pre> <p><img src="https://i.stack.imgur.com/Vb4mF.png" alt="Works"></p> <p>This is the broken file. Notice all that's different is the added linebreak (<code>0D 0A</code>).</p> <pre><code>E2 86 91 E2 86 93 0D 0A E2 86 99 E2 86 98 </code></pre> <p><img src="https://i.stack.imgur.com/P63U7.png" alt="Doesn&#39;t work"></p> <p>Can anybody share some light on what's happening here?</p> <p><strong>Edit:</strong> I'm writing a program that creates output in a text format. I stumbled upon the problem when several text editors wouldn't display my program's output correctly, so I first assumed there was something wrong with my program. As it stands, its output is just fine. So the real question is:</p> <p><em>Is there a way to change the second (broken) example so that it will display correctly in your typical editor?</em></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload