Skip to content
Permalink
Browse files

dwg import: handle filenames with utf8 characters

(cherry picked from commit dd5ed68)
  • Loading branch information
jef-n committed Aug 2, 2018
1 parent c81c499 commit 06aff729b9659f98483d7922c41fc0b6fc10dee0
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/app/dwg/qgsdwgimporter.cpp
@@ -596,7 +596,7 @@ bool QgsDwgImporter::import( const QString &drawing, QString &error, bool doExpa
if ( fi.suffix().toLower() == QLatin1String( "dxf" ) )
{
//loads dxf
std::unique_ptr<dxfRW> dxf( new dxfRW( drawing.toUtf8() ) );
std::unique_ptr<dxfRW> dxf( new dxfRW( drawing.toLocal8Bit() ) );
if ( !dxf->read( this, false ) )
{
result = DRW::BAD_UNKNOWN;
@@ -605,7 +605,7 @@ bool QgsDwgImporter::import( const QString &drawing, QString &error, bool doExpa
else if ( fi.suffix().toLower() == QLatin1String( "dwg" ) )
{
//loads dwg
std::unique_ptr<dwgR> dwg( new dwgR( drawing.toUtf8() ) );
std::unique_ptr<dwgR> dwg( new dwgR( drawing.toLocal8Bit() ) );
if ( !dwg->read( this, false ) )
{
result = dwg->getError();

0 comments on commit 06aff72

Please sign in to comment.
You can’t perform that action at this time.