<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Encoding says file is UTF8 but it's not]]></title><description><![CDATA[<p dir="auto">I’m using 7.8.5 (32bit). Encoding info always says file is utf8.<br />
But if I check using Linux file command, it isn’t.</p>
<pre><code># file aaa.sh
aaa.sh: Bourne-Again shell script, ASCII text executable
</code></pre>
<p dir="auto">It seems a bug.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/19164/encoding-says-file-is-utf8-but-it-s-not</link><generator>RSS for Node</generator><lastBuildDate>Sat, 10 Oct 2026 19:57:17 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/19164.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 06 Apr 2020 06:17:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Encoding says file is UTF8 but it's not on Mon, 06 Apr 2020 23:43:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> said in <a href="/post/52193">Encoding says file is UTF8 but it's not</a>:</p>
<blockquote>
<p dir="auto">UN-tick the option Apply to opened ANSI files in Settings &gt; Preferences… &gt; New Document &gt; Encoding, if the UTF-8 option is ticked</p>
</blockquote>
<p dir="auto">This was my case.  I didn’t know this option. Thank you.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/52235</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/52235</guid><dc:creator><![CDATA[asbyonejj]]></dc:creator><pubDate>Mon, 06 Apr 2020 23:43:57 GMT</pubDate></item><item><title><![CDATA[Reply to Encoding says file is UTF8 but it's not on Mon, 06 Apr 2020 18:46:21 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/asbyonejj" aria-label="Profile: asbyonejj">@<bdi>asbyonejj</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/gstavi" aria-label="Profile: gstavi">@<bdi>gstavi</bdi></a> and <strong>All</strong>,</p>
<p dir="auto"><strong>Reminders</strong> :</p>
<ul>
<li>
<p dir="auto">An <strong><code>ANSI</code></strong> encoded file is generally a file with an <strong>encoding</strong>, from  <strong><code>Windows-1250</code></strong> to <strong><code>Windows-1258</code></strong>, and codes <strong><code>256</code></strong> characters, divided in <strong>two</strong> parts :</p>
<ul>
<li>
<p dir="auto">Characters with <strong>Unicode</strong> code-point between <strong><code>\x00</code></strong> and <strong><code>\x7F</code></strong> ( from <strong><code>0</code></strong> to <strong><code>127</code></strong> ), coded with <strong><code>1</code></strong> byte, which belongs to the old <strong>US-ASCII</strong> encoding</p>
</li>
<li>
<p dir="auto">Characters with <strong>Unicode</strong> code-point between <strong><code>\x80</code></strong> and <strong><code>\xFF</code></strong> ( from <strong><code>128</code></strong> to <strong><code>255</code></strong> ) which are <strong>specific</strong> to a <strong>one-bit</strong> encoding, like, for instance, the <strong><code>ISO-...</code></strong> encodings family, the <strong><code>OEM-....</code></strong> encodings family and the <strong><code>Windows-....</code></strong>  encodings family, for the best-known</p>
</li>
</ul>
</li>
</ul>
<p dir="auto">For an <strong>almost</strong> exhaustive list of <strong>encodings</strong>, refer to the table, at :</p>
<p dir="auto"><a href="https://en.wikipedia.org/wiki/Windows-1252#External_links" rel="nofollow ugc">https://en.wikipedia.org/wiki/Windows-1252#External_links</a></p>
<ul>
<li>
<p dir="auto">An <strong><code>UT8</code></strong> encoded file, due to the clever <strong><code>UTF-8</code></strong> encoding ( <strong><code>U</code>niversal Character Set <code>T</code>ransformation <code>F</code>ormat - <code>8</code> bits</strong> ), can <strong>encode</strong> any of the <strong><code>1,114,112</code></strong> possible <strong>Unicode</strong> characters with :</p>
<ul>
<li>
<p dir="auto"><strong><code>1</code></strong> byte if the <strong>Unicode</strong> code-point of this character is between <strong><code>x{0000}</code></strong> and <strong><code>\x{007F}</code></strong></p>
</li>
<li>
<p dir="auto"><strong><code>2</code></strong> bytes if the <strong>Unicode</strong> code-point of this character is between <strong><code>x{0080}</code></strong> and <strong><code>\x{07FF}</code></strong></p>
</li>
<li>
<p dir="auto"><strong><code>3</code></strong> bytes if the <strong>Unicode</strong> code-point of this character is between <strong><code>x{0800}</code></strong> and <strong><code>\x{FFFF}</code></strong></p>
</li>
<li>
<p dir="auto"><strong><code>4</code></strong> bytes if the <strong>Unicode</strong> code-point of this character is between <strong><code>x{10000}</code></strong> and <strong><code>\x{10FFF}</code></strong></p>
</li>
</ul>
</li>
</ul>
<p dir="auto">However, note that the <strong>last</strong> Unicode <strong><code>v13.0</code></strong> release contains only <strong><code>283,506</code></strong> <strong>assigned</strong> characters and there <strong>still</strong> are <strong><code>830,606</code></strong> <strong>non-assigned</strong> characters, so reserved for <strong>future</strong> use !</p>
<p dir="auto"><a href="https://www.unicode.org/versions/stats/charcountv13_0.html" rel="nofollow ugc">https://www.unicode.org/versions/stats/charcountv13_0.html</a></p>
<hr />
<p dir="auto">You may have noticed than the <strong>encoding</strong> of the first <strong><code>128</code></strong> characters, between <strong><code>x{0000}</code></strong> and <strong><code>\x{007F}</code></strong>, is quite <strong>identical</strong> in an <strong><code>ANSI</code></strong> and in an <strong><code>UTF-8</code></strong> encoded file</p>
<p dir="auto">So, if your file contain <strong>only</strong> characters, with Unicode code-point <strong>lower</strong> than <strong><code>\x{0080}</code></strong> and that your file is <strong>not</strong> <strong><code>UTF-8-BOM</code></strong> encoded, it’s <strong>impossible</strong> to any editor, including <strong>Notepad++</strong>, to guess that the <strong>user</strong> assumes an <strong><code>ANSI</code></strong> or an <strong><code>UTF-8</code></strong> encoding. See :</p>
<p dir="auto"><a href="http://www.unicode.org/charts/PDF/U0000.pdf" rel="nofollow ugc">http://www.unicode.org/charts/PDF/U0000.pdf</a></p>
<hr />
<p dir="auto">Thus, in order to remove the <strong>ambiguity</strong> and help <strong>N++</strong> to decide of the <strong>right</strong> <em>user-encoding</em>, you have <strong>two</strong> possibilities :</p>
<ul>
<li>
<p dir="auto">Include in your file, at <strong>least</strong>, <strong><code>1</code></strong> character, with code-point <strong>above</strong> <strong><code>\x{007F}</code></strong></p>
</li>
<li>
<p dir="auto"><strong>UN-tick</strong> the option <strong><code>Apply to opened ANSI files</code></strong> in <strong><code>Settings &gt; Preferences... &gt; New Document &gt; Encoding</code></strong>, if the <strong><code>UTF-8</code></strong> option is <strong>ticked</strong></p>
</li>
</ul>
<p dir="auto">This way, after <strong>saving</strong> your file with the <strong><code>ANSI</code></strong> encoding  ( <strong><code>Encoding &gt; Convert to ANSI</code></strong> ), it will now <strong>keep</strong> this <strong><code>ANSI</code></strong> encoding for <strong>future</strong> N++ startups ;-))</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/52193</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/52193</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Mon, 06 Apr 2020 18:46:21 GMT</pubDate></item><item><title><![CDATA[Reply to Encoding says file is UTF8 but it's not on Mon, 06 Apr 2020 07:03:26 GMT]]></title><description><![CDATA[<p dir="auto">It is not clear what is your goal, I assume you want a file to be ANSI and for Notepad++ to show it.</p>
<p dir="auto">You need some background about <a href="https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses" rel="nofollow ugc">unicode encoding</a>.</p>
<p dir="auto">UTF8 extends ANSI in a backward compatible fashion.<br />
Every ANSI file is also UTF8 by definition but NOT vice versa.<br />
Rest assured that if your UTF8 file <strong>only</strong> contains symbols in the range of 0-127 than it is also ANSI.<br />
Just make sure it does not have BOM in case it need to be consumed by older applications that fail to skip it.</p>
<p dir="auto">Basically the term ANSI, in the context of text encoding, should stop being used. People should be educated that requirement for “ANSI” is in fact requirement for “UTF8”.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/52190</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/52190</guid><dc:creator><![CDATA[gstavi]]></dc:creator><pubDate>Mon, 06 Apr 2020 07:03:26 GMT</pubDate></item><item><title><![CDATA[Reply to Encoding says file is UTF8 but it's not on Mon, 06 Apr 2020 06:39:16 GMT]]></title><description><![CDATA[<p dir="auto">Even if I’ve done “Convert to ANSI”, but it stills UTF8.<br />
Does other guys see this problem with version 7.8.5?<br />
I want to know if this is found only to me…</p>
]]></description><link>https://community.notepad-plus-plus.org/post/52189</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/52189</guid><dc:creator><![CDATA[asbyonejj]]></dc:creator><pubDate>Mon, 06 Apr 2020 06:39:16 GMT</pubDate></item></channel></rss>