[UE] FString和v8::String用UTF16传参,无需使用UTF8编码转换 #1591
BlurryLight
started this conversation in
Ideas
Replies: 2 comments 2 replies
-
早期试过,忘记什么原因放弃了。 你可以先试试。 |
Beta Was this translation helpful? Give feedback.
0 replies
-
你们在你们项目中验证这想法了么? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
v8::String
支持用UTF-16存储字符串,不需要在JSEnv
里传参的时候转成UTF-8
。见 https://v8.github.io/api/head/classv8_1_1String.html#aac41d1932f0897dace0a507abda6d49f
UE2JS:
v8::String::NewFromTwoByte(Isolate, TCHAR_TO_UTF16(String), v8::NewStringType::kNormal).ToLocalChecked();
JS2UE:
简单写了个benchmark,
测试数据
Beta Was this translation helpful? Give feedback.
All reactions