且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将 Unicode 字符串转换为 TCHAR 系统?

更新时间:2023-02-14 11:36:34

根据您的配置,TCHAR 映射到 wchar_t,这是一种使用 UTF- 单边编码的字符类型Windows 上的 16LE.

Given your configuration, TCHAR maps to wchar_t, a character type that is unilaterally encoded using UTF-16LE on Windows.

您可以使用以下方法对字符串进行编码:

You can encode the string using:

by = bytes(st, 'utf-16')