diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2001-01-07 17:28:47 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2001-01-07 17:28:47 (GMT) |
commit | 583cc3299ac171f473e4221b0b535ea616e4db03 (patch) | |
tree | e0730802a8bb7eac348a5e39cffb88118aa42020 /qtools/qstring.cpp | |
parent | 0c9bfb1e7fee31b0f35201e255096df4f6451035 (diff) | |
download | Doxygen-583cc3299ac171f473e4221b0b535ea616e4db03.zip Doxygen-583cc3299ac171f473e4221b0b535ea616e4db03.tar.gz Doxygen-583cc3299ac171f473e4221b0b535ea616e4db03.tar.bz2 |
Release-1.2.4-20010107
Diffstat (limited to 'qtools/qstring.cpp')
-rw-r--r-- | qtools/qstring.cpp | 10 |
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; |