开发者

Embed a file as unicode (WCHAR) into a resource

开发者 https://www.devze.com 2023-01-25 19:18 出处:网络
I have a text file that I\'d like t开发者_运维问答o embed within a resource in Win32, but with Unicode characters - that is, each character takes 2 bytes. How can I do this? The file only contains ASC

I have a text file that I'd like t开发者_运维问答o embed within a resource in Win32, but with Unicode characters - that is, each character takes 2 bytes. How can I do this? The file only contains ASCII characters.

Is there an indication or flag whether or not a file is a Unicode file?

I have now as resource.rc:

FILE FILE_TYPE "text.txt"

When it is loaded at runtime, each character takes up 1 byte.


RC does not interpret the contents of files embedded in this way. Are you sure the file was saved as Unicode?

If not, you can save the file as Unicode from Notepad (File -> Save As, choose Encoding = Unicode).

0

精彩评论

暂无评论...
验证码 换一张
取 消