make filename encoding consistent (gdal/ogr)

There are still some filename encoding problems. For example, with the Terrain Analysis plugin, a output filename is garbled if the filename includes non-ascii characters. This patch fixes the problems.