def test_write_utf8(self):
    schema = {'geometry': 'Point', 'properties': {'label': 'str', u'verité': 'int'}}
    with fiona.open(os.path.join(self.tempdir, 'test-write.shp'), 'w', 'ESRI Shapefile', schema=schema, encoding='utf-8') as c:
        c.writerecords([{'type': 'Feature', 'geometry': {'type': 'Point', 'coordinates': [0, 0]}, 'properties': {'label': u'Ba’kelalan', u'verité': 0}}])
    with fiona.open(os.path.join(self.tempdir), encoding='utf-8') as c:
        f = next(iter(c))
        self.assertEqual(f['properties']['label'], u'Ba’kelalan')
        self.assertEqual(f['properties'][u'verité'], 0)
def test_write_utf8(self):
    schema = {'geometry': 'Point', 'properties': {'label': 'str', u'verité': 'int'}}
    with fiona.open(os.path.join(self.tempdir, 'test-write.shp'), 'w', 'ESRI Shapefile', schema=schema, encoding='utf-8') as c:
        c.writerecords([{'type': 'Feature', 'geometry': {'type': 'Point', 'coordinates': [0, 0]}, 'properties': {'label': u'Ba’kelalan', u'verité': 0}}])
    with fiona.open(os.path.join(self.tempdir), encoding='utf-8') as c:
        f = next(iter(c))
        self.assertEqual(f['properties']['label'], u'Ba’kelalan')
        self.assertEqual(f['properties'][u'verité'], 0)