Duration util test#2015
Conversation
…tf8 encoding fails
| formatKiloSeconds(QString::fromUtf8("0.999\u2009990"), 999.99); | ||
| formatKiloSeconds(QString::fromUtf8("1.000\u2009000"), 1000.00); | ||
| formatKiloSeconds(QString::fromUtf8("86.400\u2009000"), 24 * 3600); | ||
| formatKiloSeconds(QStringLiteral("0.000\u2009000"), 0); |
There was a problem hiding this comment.
If the characters in the C++ string literal are UTF-8 encoded shouldn't it be prefixed with u8?
QStringLiteral(u8"0.000\u2009000")
There was a problem hiding this comment.
That might be another solution together with the fromUtf8() call.
The issue was that msvc has replaced the thin space with a replacement ?
Maybe because it uses a ASCII intermediate string or thomething.
QStringLiteral is a macro including the L prefix so it should be save here.
Unfortunately Appveyor has timed out do we have no results on the critical Os. :-(
There was a problem hiding this comment.
Ok, the unicode character code should be interpreted correctly no matter which encoding you choose for the string literal.
|
Since we have no ci for Windows here. Can we merge it and fix reaming issues in a follow up PR if required? |
7d739b5 to
24e6220
Compare
|
force push to trigger CI |
|
LGTM, waiting for the CI builds. |
|
Still doesn't work!? |
… if \u notation is used.
|
Appveyor timed out. So I have tested the solution with msvc 2017 seperately and it works. |
|
Accepted ;) |
This is an attempt to fix tests on Windows, as discussed here:
https://mixxx.zulipchat.com/#narrow/stream/109171-development/topic/DurationUtilTest.2EFormatKiloSeconds.20failure.20on.20master