docstr: TOFIX: OGR silently fails to convert strings
docstr_tok: ["TOFIX",":","OGR","silently","fails","to","convert","strings"]
code: def test_write_mismatch(self):
      """TOFIX: OGR silently fails to convert strings"""
      # Details:
      #
      # If we tell OGR that we want a latin-1 encoded output file and
      # give it a feature with a unicode property that can't be converted
      # to latin-1, no error is raised and OGR just writes the utf-8
      # encoded bytes to the output file.
      #
      # This might be shapefile specific.
      #
      # Consequences: no error on write, but there will be an error
      # on reading the data and expecting latin-1.
      schema = {
          "geometry": "Point",
          "properties": {"label": "str", "num": "int"},
      }
  
      with fiona.open(
          os.path.join(self.tempdir, "test-write-fail.shp"),
          "w",
          driver="ESRI Shapefile",
          schema=schema,
          encoding="latin1",
      ) as c:
          c.writerecords(
              [
                  {
                      "type": "Feature",
                      "geometry": {
                          "type": "Point",
                          "coordinates": [0, 0],
                      },
                      "properties": {"label": "徐汇区", "num": 0},
                  }
              ]
          )
  
      with fiona.open(
          os.path.join(self.tempdir), encoding="latin1"
      ) as c:
          f = next(iter(c))
          # Next assert fails.
          assert f.properties["label"] == "徐汇区"
  
imports: import os
  import shutil
  import sys
  import tempfile
  import unittest
  import pytest
  import fiona
  from fiona.errors import SchemaError
  from fiona.model import Feature
label_desc: Use image node_id 3 for calling the TestUnicodeStringField obj's underlying member method code with example usage: obj.test_write_mismatch() without return types