summaryrefslogtreecommitdiff
path: root/binaryninjaapi.h
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2024-09-26 03:48:24 -0400
committerGlenn Smith <glenn@vector35.com>2024-10-14 16:59:13 -0400
commit5353484086517832418955474757290903351986 (patch)
tree4230de7d1e64fe1f77f995a5f8855fbc408e1c7c /binaryninjaapi.h
parent6222101365828410769950281422115789136654 (diff)
Expose Unicode conversion functions
Diffstat (limited to 'binaryninjaapi.h')
-rw-r--r--binaryninjaapi.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h
index 04d8bd6d..3ba08f5f 100644
--- a/binaryninjaapi.h
+++ b/binaryninjaapi.h
@@ -17967,6 +17967,28 @@ namespace BinaryNinja {
*/
bool IsAborted();
};
+
+ namespace Unicode
+ {
+ std::string UTF16ToUTF8(const uint8_t* utf16, const size_t len);
+ std::string UTF32ToUTF8(const uint8_t* utf32);
+ bool GetBlockRange(const std::string& name, std::pair<uint32_t, uint32_t>& range);
+ std::vector<std::vector<std::pair<uint32_t, uint32_t>>> GetBlocksForNames(const std::vector<std::string>& names);
+ std::vector<std::string> GetBlockNames();
+ std::map<std::string, std::pair<uint32_t, uint32_t>> GetBlockRanges();
+ std::string GetUTF8String(
+ const std::vector<std::vector<std::pair<uint32_t, uint32_t>>>& unicodeBlocks,
+ const uint8_t* data,
+ const size_t offset,
+ const size_t dataLen
+ );
+ std::string ToEscapedString(
+ const std::vector<std::vector<std::pair<uint32_t, uint32_t>>>& unicodeBlocks,
+ bool utf8Enabled,
+ const void* data,
+ const size_t dataLen
+ );
+ } // namespace Unicode
} // namespace BinaryNinja