write field names in the same encoding as attribute values (fix #4540)

I decided to do pull request to fix this issue. This covers also http://hub.qgis.org/issues/6059