News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Can RC.EXE Automatically Detect ASCII or UTF-16 Encoding?

Started by wanker742126, October 28, 2024, 04:16:19 PM

Previous topic - Next topic

wanker742126

Hello everyone,

I hope you're all doing well. I have a question regarding the RC.EXE resource compiler in Windows development. I was wondering if RC.EXE can automatically detect whether a .rc file is encoded in ASCII or UTF-16, or if any special configuration is required for this. I want to ensure my .rc files are processed correctly and avoid any encoding-related issues.

Thank you very much for your insights and guidance!


wanker742126

Quote from: TimoVJL on October 28, 2024, 05:18:40 PMPerhaps have to use BOM.

What Raymond said:
The Resource Compiler defaults to CP_ACP, even in the face of subtle hints that the file is UTF-8
Thank you very much for your answer! In that case, I'll make sure to select the UTF-8 (with BOM) format when saving .RC files in UltraEdit from now on.

fearless

You can also use unicode in resource files if you set to UTF-16 LE BOM in Notepad++ or i presume UltraEdit as well. Notepad also handles editing of UTF-16 LE BOM files, and in some cases works better than Notepad++ - I found this out when adding CN and FA languages to my media player - Notepad++ would sometimes should incorrect characters, but plain Notepad (Win10) was able to view and edit the text properly for the .rc files, when pasting unicode text.

wanker742126

Thank fearless,
I just tested Notepad on Win10. When saving a file, it only offers ANSI, UTF-16LE, UTF-16BE, UTF-8, and UTF-8 BOM options. Later, I found that UTF-16LE and UTF-16BE automatically add BOM by default.