Changeset 5f12660 in subsurface


Ignore:
Timestamp:
Dec 16, 2013, 4:14:50 PM (4 years ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
Mtest, android_test, dcDownload, foratdotde, gitMerge, gitdebug, gitpictures, ios, master, mergeKirigamiPort, pictimeshift, resolutionIndependence, spinner, testTomaz, testing, v4.0-branch, v4.0.3-branch, v4.2-branch, v4.4-branch, v4.5-branch
Children:
ca8aee4
Parents:
43385eb
git-author:
Michael Andreen <harv@…> (12/16/13 14:50:42)
git-committer:
Dirk Hohndel <dirk@…> (12/16/13 16:14:50)
Message:

Use UTF-8 for text strings.

Fixes #371

Signed-off-by: Michael Andreen <harv@…>
Signed-off-by: Dirk Hohndel <dirk@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • qt-ui/maintab.cpp

    r4b98efb3 r5f12660  
    688688
    689689#define EDIT_TEXT2(what, text) \
    690         textByteArray = text.toLocal8Bit(); \
     690        textByteArray = text.toUtf8(); \
    691691        free(what);\
    692692        what = strdup(textByteArray.data());
    693693
    694694#define EDIT_TEXT(what, text) \
    695         QByteArray textByteArray = text.toLocal8Bit(); \
     695        QByteArray textByteArray = text.toUtf8(); \
    696696        free(what);\
    697697        what = strdup(textByteArray.data());
     
    977977        ilonmin = (lon % 1000000) * 60;
    978978        result.sprintf("%s%u%s %2d.%05d\' , %s%u%s %2d.%05d\'",
    979                        lath.toLocal8Bit().data(), latdeg, UTF8_DEGREE, ilatmin / 1000000, (ilatmin % 1000000) / 10,
    980                        lonh.toLocal8Bit().data(), londeg, UTF8_DEGREE, ilonmin / 1000000, (ilonmin % 1000000) / 10);
     979                       lath.toUtf8().data(), latdeg, UTF8_DEGREE, ilatmin / 1000000, (ilatmin % 1000000) / 10,
     980                       lonh.toUtf8().data(), londeg, UTF8_DEGREE, ilonmin / 1000000, (ilonmin % 1000000) / 10);
    981981        return result;
    982982}
Note: See TracChangeset for help on using the changeset viewer.