# C1.Zip.ZipEncoding

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Zip_ZipEncoding" data-uid="C1.Zip.ZipEncoding" class="text-break">ZipEncoding Class
</h1>
  <div class="markdown level0 summary"><p>Encoding used for entry names and comments.
The default encoding is UTF-8.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><span class="xref">ZipEncoding</span></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.Zip.html">C1.Zip</a></h6>
  <h6><strong>Assembly</strong>: C1.Zip.dll</h6>
  <h5 id="C1_Zip_ZipEncoding_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class ZipEncoding</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class ZipEncoding</code></pre>
  </div>
  <h5 id="C1_Zip_ZipEncoding_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>This class does not affect compression, it's just used to encode and decode entry
names and comments.</p>
<p>The initial version of ZIP format did not support UTF-8. So, some old zip utilities might not recognise this format.
Change Encoding property to some other value if you need backward compatibility.</p>
<p>Note that Encoding.Default seems like a logical choice but doesn't really work for
international locales. Instead, we need to create an encoding using the current
OEMCodePage. That allows accents and international characters to be used in file
names (like the zip built into Windows, allows names such as &quot;Åland.txt&quot;, &quot;Äiti.txt&quot;,
&quot;Würth.txt&quot;, etc.).</p>
</div>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Zip_ZipEncoding_Encoding" data-uid="C1.Zip.ZipEncoding.Encoding">
          <a class="xref" href="C1.Zip.ZipEncoding.Encoding.html#C1_Zip_ZipEncoding_Encoding">Encoding</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets Encoding that is used for entry names and comments.
The default encoding is UTF-8.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
