I have source code with an encoding different then my system’s default encoding for non-Unicode application.
For example my machine is default to Windows 1255, but the code I am trying to build is in Windows 1252 encoding.
Is there a way to set the MSbuild encoding to a specific encoding for a specific build?
This is a machine that does multiple build for files in multiple different encodings.
The C# compiler is fully unicode aware – what problems are you having specifically? It is generally fairly rare for actual source code to contain large amounts of non-ASCII anyway.
But I suspect the simplest thing in your case would be to change the files to UTF8… no more problem. It would be pretty easy to script loading it with a specific
Encodingand then saving withEncoding.UTF8.