Skip to content

Commit 4945e97

Browse files
committedAug 2, 2018
dwg import: handle filenames with utf8 characters
1 parent 5a99678 commit 4945e97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/app/dwg/qgsdwgimporter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ bool QgsDwgImporter::import( const QString &drawing, QString &error, bool doExpa
623623
if ( fi.suffix().toLower() == "dxf" )
624624
{
625625
//loads dxf
626-
QScopedPointer<dxfRW> dxf( new dxfRW( drawing.toUtf8() ) );
626+
QScopedPointer<dxfRW> dxf( new dxfRW( drawing.toLocal8Bit() ) );
627627
if ( !dxf->read( this, false ) )
628628
{
629629
result = DRW::BAD_UNKNOWN;
@@ -632,7 +632,7 @@ bool QgsDwgImporter::import( const QString &drawing, QString &error, bool doExpa
632632
else if ( fi.suffix().toLower() == "dwg" )
633633
{
634634
//loads dwg
635-
QScopedPointer<dwgR> dwg( new dwgR( drawing.toUtf8() ) );
635+
QScopedPointer<dwgR> dwg( new dwgR( drawing.toLocal8Bit() ) );
636636
if ( !dwg->read( this, false ) )
637637
{
638638
result = dwg->getError();

0 commit comments

Comments
 (0)
Please sign in to comment.