Fabric: Add Unicode prefix to AttachmentCharacter (#28617)
Summary: This pull request adds a Unicode `u8` prefix to the string literal returned in `AttributedString.cpp`'s `Fragment::AttachmentCharacter()`. This fixes the following error when building on MSVC: ``` react\attributedstring\AttributedString.cpp(21): error C4566: character represented by universal-character-name '\uFFFC' cannot be represented in the current code page (1252) ``` ## Changelog [Internal] [Fixed] - Fabric: Add Unicode prefix to AttachmentCharacter Pull Request resolved: https://github.com/facebook/react-native/pull/28617 Test Plan: The Fabric test suite has been ran on a Clang-based build of Fabric on macOS, and no regressions in it have been noted. Differential Revision: D21118078 Pulled By: shergin fbshipit-source-id: c105de5e4edb67fed97ce44153a75d9d380bf588
This commit is contained in:
Родитель
de188a2c97
Коммит
b0006648e2
|
@ -18,7 +18,7 @@ using Fragments = AttributedString::Fragments;
|
|||
#pragma mark - Fragment
|
||||
|
||||
std::string Fragment::AttachmentCharacter() {
|
||||
return "\uFFFC"; // Unicode `OBJECT REPLACEMENT CHARACTER`
|
||||
return u8"\uFFFC"; // Unicode `OBJECT REPLACEMENT CHARACTER`
|
||||
}
|
||||
|
||||
bool Fragment::isAttachment() const {
|
||||
|
|
Загрузка…
Ссылка в новой задаче