title: Writing dbf file with custom encoding (DBF Package)
body: <p>I have some Characters in Farsi and I want to write them to a dbf file with my custom codepage which is 1 byte per character.
  I think this problem can be solved in one of these two ways:</p>
  <p>1- Passing my custom codepage to the dbf table.</p>
  <p>2- Writing binary data directly to the dbf file without using the default codepage of <a href="https://github.com/ethanfurman/dbf" rel="nofollow noreferrer">dbf package</a> (which is utf8).</p>
  <p>How can I solve this problem with either of these approaches?</p>
  <p>Here is the code:</p>
  <pre><code>import dbf
  
  man = 'مرد'
  woman = 'زن'
  row1 = (man, woman)
  row2 = (man, woman)
  
  with open('./file.dbf', 'w') as f:
      table = dbf.Table(filename='./file.dbf',
          field_specs='field1 C(3); field2 C(3)', codepage='customCodePage', on_disk=True)
      table.open(dbf.READ_WRITE)
      table.append(row1)
      table.append(row2)
      table.close()
  </code></pre>