diff --git a/providers/gpx/qgsgpxprovider.cpp b/providers/gpx/qgsgpxprovider.cpp index 793dd185a9b..bdf5eba8a1c 100644 --- a/providers/gpx/qgsgpxprovider.cpp +++ b/providers/gpx/qgsgpxprovider.cpp @@ -61,6 +61,9 @@ QgsGPXProvider::QgsGPXProvider(QString uri) : mDataSourceUri(uri), // assume that it won't work mValid = false; + // we always use UTF-8 + mEncoding = QTextCodec::codecForName("utf8"); + // get the filename and the type parameter from the URI int fileNameEnd = uri.find('?'); if (fileNameEnd == -1 || uri.mid(fileNameEnd + 1, 5) != "type=") {