Skip to content

Commit e0e248c

Browse files
author
mhugent
committed
Fix to enable spatial bookmarks with non-ascii characters
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8173 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 4b9aa12 commit e0e248c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/app/qgsbookmarkitem.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,12 @@ QgsBookmarkItem::~QgsBookmarkItem()
6969
mSrid << ")";
7070

7171
#ifdef QGISDEBUG
72-
std::cout << "Storing bookmark using: " << sql.toLocal8Bit().data() << std::endl;
72+
std::cout << "Storing bookmark using: " << sql.toUtf8().data() << std::endl;
7373
#endif
74-
rc = sqlite3_prepare(db, sql.utf8(), sql.length(), &ppStmt, &pzTail);
74+
75+
QByteArray sqlData = sql.toUtf8();
76+
77+
rc = sqlite3_prepare(db, sqlData.constData(), sqlData.size(), &ppStmt, &pzTail);
7578
// XXX Need to free memory from the error msg if one is set
7679
if(rc == SQLITE_OK)
7780
{

0 commit comments

Comments
 (0)