visual-studio-2017-build-toolsresgen

Generating .resx resource files in the correct encoding


I know I can change a resource file's encoding in the Properties tool window (e.g. to Unicode/utf-16), but this only sets the it for the existing file.

Can I get Visual Studio's Resource Generator (resgen.exe) to output files of a specific encoding in the first place, so that I don't need to change the encoding type every time I add, remove or update an entry in the file using the resource editor, or do I need to add a pre-build event command in the project properties?


Solution

  • It turns out I was over-complicating matters, I opted to use the UTF-16-to-UTF-8 character converter instead.

    This seems to be enough for my needs.