KFormat: Replace unicode literal with unicode codepoint to fix MSVC build
ClosedPublic

Authored by bruns on Jul 15 2018, 12:54 AM.

Details

Summary

MSVC is unable to parse UTF-8 sequences when the file has no BOM (byte
order mark), and fails with "error C2015: too many characters in constant".

Test Plan

run kformattest unit test

Diff Detail

Repository
R244 KCoreAddons
Branch
msvc_fix
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 854
Build 867: arc lint + arc unit
bruns created this revision.Jul 15 2018, 12:54 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptJul 15 2018, 12:54 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
bruns requested review of this revision.Jul 15 2018, 12:54 AM
bcooksley accepted this revision.Jul 15 2018, 3:36 AM

Thanks for uploading this, that looks fine to me!

This revision is now accepted and ready to land.Jul 15 2018, 3:36 AM
This revision was automatically updated to reflect the committed changes.
dhaumann added inline comments.
src/lib/util/kformatprivate.cpp
121–122

Would it make sense to mention with which MSVC version this was tested? At some point in time, this may be fixed, and then the comment is wrong.

bcooksley added inline comments.Jul 16 2018, 10:47 AM
src/lib/util/kformatprivate.cpp
121–122

For the record, the current version of MSVC in use is 19.14.26430.0 (MSVS 2017, v15.7.3)