编码
import chardet # 首先二进制方式打开文件 with open(absPath, 'rb') as frb: # 检测编码方式 cur_encoding = chardet.detect(frb.read())['encoding'] # 指定文件编码方式 with open(absPath, 'r', encoding=cur_encoding) as fr: Content = fr.read()
FString MetaData; FTCHARToUTF8 MetaUtf8(*MetaData); NDI_video_frame.p_metadata = MetaUtf8.Get(); #define FSTRING_TO_STD(a) (std::string(TCHAR_TO_UTF8(*a)))