mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 01:25:39 +00:00
ccdc57dd96
Summary: JSC's utf16 -> utf8 conversion crashes on encountering bad utf16. Instead, use our own conversion (conveniently copied from fbjni). Original fix thanks to rigdern (https://github.com/facebook/react-native/pull/9302) Reviewed By: mhorowitz Differential Revision: D3746947 fbshipit-source-id: 29887ca720f6a2b074f01f853bad28a083b273bc
15 lines
247 B
C++
15 lines
247 B
C++
// Copyright 2004-present Facebook. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
#include <cstdint>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
namespace unicode {
|
|
std::string utf16toUTF8(const uint16_t* utf16, size_t length) noexcept;
|
|
}
|
|
}
|
|
}
|