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).
精彩评论