Skip to content

Commit b000664

Browse files
empyricalfacebook-github-bot
authored andcommitted
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: #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
1 parent de188a2 commit b000664

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ReactCommon/fabric/attributedstring/AttributedString.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ using Fragments = AttributedString::Fragments;
1818
#pragma mark - Fragment
1919

2020
std::string Fragment::AttachmentCharacter() {
21-
return "\uFFFC"; // Unicode `OBJECT REPLACEMENT CHARACTER`
21+
return u8"\uFFFC"; // Unicode `OBJECT REPLACEMENT CHARACTER`
2222
}
2323

2424
bool Fragment::isAttachment() const {

0 commit comments

Comments
 (0)