Fabric: Using proper encoding for converting user-facing strings to NSString

Summary:
@public
Trivial.

Reviewed By: fkgozali

Differential Revision: D8473507

fbshipit-source-id: 49c9e66dc6b32b0a5208aeb4c2fb68fbe1f71738
This commit is contained in:
Valentin Shergin 2018-06-22 07:28:26 -07:00 committed by Facebook Github Bot
parent 6264b6932a
commit eff76d237b
1 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@
inline static UIFont *RCTEffectiveFontFromTextAttributes(const TextAttributes &textAttributes) {
NSString *fontFamily = [NSString stringWithCString:textAttributes.fontFamily.c_str()
encoding:NSASCIIStringEncoding];
encoding:NSUTF8StringEncoding];
RCTFontProperties fontProperties;
fontProperties.family = fontFamily;
@ -199,7 +199,7 @@ NSAttributedString *RCTNSAttributedStringFromAttributedString(const AttributedSt
} else {
NSString *string =
[NSString stringWithCString:fragment.string.c_str()
encoding:NSASCIIStringEncoding];
encoding:NSUTF8StringEncoding];
nsAttributedStringFragment =
[[NSAttributedString alloc] initWithString:string