Commit 3621a2f9 authored by Orvid King's avatar Orvid King Committed by Facebook Github Bot

Fix Folly for C++ p0482

Summary:
TLDR; The element type of a utf8 string literal was changed from a `char` to a `char8_t`, which are incompatible. There is a paper that aims to resolve some of these issues, but the next version of MSVC has already implemented p0482, so we need to add a workaround for now.

Fixes: https://github.com/facebook/folly/issues/1102

Reviewed By: yfeldblum

Differential Revision: D14856705

fbshipit-source-id: 983548cb0cb210341ec55d9dcdc63e726bfe4f62
parent 70ebf75b
......@@ -767,7 +767,7 @@ void escapeStringImpl(
// checking that utf8 encodings are valid
char32_t v = utf8ToCodePoint(q, e, opts.skip_invalid_utf8);
if (opts.skip_invalid_utf8 && v == U'\ufffd') {
out.append(u8"\ufffd");
out.append(reinterpret_cast<const char*>(u8"\ufffd"));
p = q;
continue;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment