diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2010-11-04 07:47:08 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2010-11-08 09:51:41 (GMT) |
commit | e5345aa59d6573abb39b50285b63aafcddd9f13b (patch) | |
tree | c209a5390c893dd1ab7fa37335fa1ef61c3e4b95 /mkspecs/common | |
parent | e00354a40db497fe35fde7055521c2246e7a3e7c (diff) | |
download | Qt-e5345aa59d6573abb39b50285b63aafcddd9f13b.zip Qt-e5345aa59d6573abb39b50285b63aafcddd9f13b.tar.gz Qt-e5345aa59d6573abb39b50285b63aafcddd9f13b.tar.bz2 |
Make qmake to pass all UTF-8 characters unchanged through parser.
QMakeProject::parse() calls QString::simplified(), which assumes any
byte 0xA0 in multibyte UTF-8 characters is a space character (0x00A0 is
unicode character NBSP [non-breaking space]) and replaces those bytes
with regular space, corrupting the UTF-8 string.
Fixed by temporarily changing all 0xA0 bytes in parser input to another
non-space character 0x01A0. This is safe replacement as qmake doesn't
accept unicode .pro files, so there should never be actual NBSP or the
replacement 0x01A0 characters in a valid .pro file.
Note that there are a couple of more uses of QString::simplified() in
qmake, but those do not deal with strings that need to be UTF-8
compatible as far as I can tell, so no need to touch them.
Cherry picked to 4.7 branch from master branch as part of QTBUG-15068,
original commit: 15a7626480b64d85992bed819fe6052e0c5c8fa9
Task-number: QTBUG-15068
Task-number: QTBUG-14357
Reviewed-by: Oswald Buddenhagen
Diffstat (limited to 'mkspecs/common')
0 files changed, 0 insertions, 0 deletions