summaryrefslogtreecommitdiffstats
path: root/qtools/qstring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qtools/qstring.cpp')
-rw-r--r--qtools/qstring.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/qtools/qstring.cpp b/qtools/qstring.cpp
index 85962b2..e13ffc8 100644
--- a/qtools/qstring.cpp
+++ b/qtools/qstring.cpp
@@ -13928,8 +13928,14 @@ uint QString::toUInt( bool *ok, int base ) const
double QString::toDouble( bool *ok ) const
{
char *end;
- const char *a = latin1();
- double val = strtod( a ? a : "", &end );
+
+ QCString a = latin1();
+ // Just latin1() is not sufficient, since U0131 would look like '1'.
+ for (uint i=0; i<d->len; i++)
+ if ( d->unicode[i].row() )
+ a[(int)i]='z';
+
+ double val = strtod( a.data() ? a.data() : "", &end );
if ( ok )
*ok = ( a && *a && ( end == 0 || *end == '\0' ) );
return val;