Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Utf8
  • Loading branch information
nyalldawson committed Jan 11, 2022
1 parent e57c8e3 commit 8896eb7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gui/qgscrsdefinitionwidget.cpp
Expand Up @@ -124,7 +124,7 @@ void QgsCrsDefinitionWidget::validateCurrent()
{
PROJ_STRING_LIST warnings = nullptr;
PROJ_STRING_LIST grammerErrors = nullptr;
crs.reset( proj_create_from_wkt( context, projDef.toLatin1().constData(), nullptr, &warnings, &grammerErrors ) );
crs.reset( proj_create_from_wkt( context, projDef.toUtf8().constData(), nullptr, &warnings, &grammerErrors ) );
QStringList warningStrings;
QStringList grammerStrings;
for ( auto iter = warnings; iter && *iter; ++iter )
Expand All @@ -150,7 +150,7 @@ void QgsCrsDefinitionWidget::validateCurrent()
case Qgis::CrsDefinitionFormat::Proj:
{
const QString projCrsString = projDef + ( projDef.contains( QStringLiteral( "+type=crs" ) ) ? QString() : QStringLiteral( " +type=crs" ) );
crs.reset( proj_create( context, projCrsString.toLatin1().constData() ) );
crs.reset( proj_create( context, projCrsString.toUtf8().constData() ) );
if ( crs )
{
QMessageBox::information( this, tr( "Custom Coordinate Reference System" ),
Expand Down Expand Up @@ -191,7 +191,7 @@ void QgsCrsDefinitionWidget::formatChanged()
QString proj = mTextEditParameters->toPlainText();
proj.replace( QLatin1String( "+type=crs" ), QString() );
proj += QLatin1String( " +type=crs" );
QgsProjUtils::proj_pj_unique_ptr crs( proj_create( QgsProjContext::get(), proj.toLatin1().constData() ) );
QgsProjUtils::proj_pj_unique_ptr crs( proj_create( QgsProjContext::get(), proj.toUtf8().constData() ) );
if ( crs )
{
const QByteArray multiLineOption = QStringLiteral( "MULTILINE=YES" ).toLocal8Bit();
Expand Down

0 comments on commit 8896eb7

Please sign in to comment.