Changing File Encoding in Visual Studio 2015 - visual-studio

I just installed Visual Studio 2015 Professional (Version 14.0.23107.0 D14REL).
I created a simple MFC project and when I tried to change file encoding, Visual Studio just shows a few encoding types.
Unicode (UTF-8 with signature) - Codepage 65001
Unicode - Codepage 1200
Unicode (Big-Endian) - Codepage 1201
My favorite encoding is UTF-8 without BOM (65001) but this is not in the list.
How can I fix this???

I found this problem after upgrading to windows 10.
Installing the US English language pack restored the full list of encodings on VS.
Just installs it without making it the default language.

Related

Is there anything different in the compiler files between English and Korean version of Visual C++?

I need Visual C++ 2015 in order to build parts of a different tool that I need (that is, I won't be using visual studio itself), but I only have the Korean installer available
Other than the language of the user interface, can I expect the compiler itself in the Korean version to behave exactly the same way as the English version? The other tool that I am trying to build automatically detects the presence of Visual C++ 2015 and it is supposed to build itself automatically, but it's failing with many errors. Is there anything different between the English version of Visual Studio and Korean (or any non English version in general) at the compiler level, other than the user interface text? Can I expect both of them to behave exactly same at the command line level?

How to solve broken characters by different charset between github and visual studio

Now I'm using Github to help students download Visual Studio Project online.
But there's a problem. Visual Studio force me to use EUC-KR encoding. (I already tried to change source code files to utf-8, but visual studio were crushed and showed me errors.)
Because of it, My students are suffering from broken-comments by encoding problems in github. (especially some students that uses mac or linux in their labtop).
[Ref] https://github.com/waps12b/ajou.datastructure.2018.spring/blob/master/Week01/Exercise01/src.c
So I got some questions.
[1] Is there the way that force VS to use UTF-8 encoding in all solutions. (Not only me but also students that open this solution in their own environments).
[2] If I have to use EUC-KR encoding only in VS, How can I solve broken-charset problem in github??
[3] In some projects using VS, How they deal with this problem in development team?
"UTF-8 with BOM" incoding is compatible with VS and Github properly.
I used VS code to change file encodings.

Visual Studio Express 2013 for Web - Save file with encoding unchanged

VSEW 2013 is changing the encoding of a file when it saves it - a problem that did not occur for me in VSEW 2012. I cannot remember whether I changed the config. to prevent this in VSEW 2012, or whether it worked as required by default.
In any case I cannot work out how to conserve the encoding, except for each file individually via File > Save As and explicitly setting the required encoding. It would be tedious (and very error-prone) to rely on this approach.
In particular, an HTML file originally encoded as UTF-8 without BOM (without signature) is saved as UTF-8 with BOM by VSEW 2013.
Is there any global setting to prevent VSEW 2013 from changing the encoding, or to set it always to use UTF-8 without BOM?
JPL
P.S. The free Fix File Encoding extension (FixFileEncoding_11.vsix) from Vlasov Studio does what is required (and more), but can be installed on Visual Studio Pro only, not the Express version. http://vlasovstudio.com/fix-file-encoding/index.html
You can install Fix File Encoding for VS2013. According to the site, it "automatically detects when a UTF-8 file is opened in Visual Studio and sets its encoding to UTF-8 without signature. If you don't edit the file, it remains unmodified. If you edit the file, it will be saved without the BOM."
It worked just fine to me. Hope it helps.

tell visual studio to create a utf-8 environment when running executables

I am using CMAKE with CTEST to run my regressions. My application is a console app which outputs in whatever encoding it is presented by it's environment (A feature of Tcl).
How do I tell visual studio that when it runs my application to run it in a utf-8 environment. Right now my regression results are encoded in latin, and it makes it difficult to compare with regressions on my linux builds.
The stdout/stderr streams do not support unicode, so Visual Studio has no way of receiving unicode output from your process. This was an issue MS had to work around when implementing Unicode support in VS 2005, see this blogpost. In short, cl.exe uses a set of pipes to write unicode output to the Visual Studio console window.
Your wrapper could either convert the output of your process into the system code-page, or figure out how to open the Unicode pipes used by cl.exe and write to them instead.

how to change source file encoding in csharp project (visual studio / msbuild machine)?

Is there a way to force VS to use Unicode always, instead of weird ISO-something?
I'm working on a winapp csproject using Visual Studio 2008 on Vista (Polish locale). The problem appears when I build the project on Win Server 2003 (English locale) - then Polish diacritic is gone.
I investigated that the issue is caused by improper source file encoding. It looks that source files aren't using UTF-8 encoding.
Problem: Compiler launched from command line cannot process the source file because of international characters that I’ve just added.
Solution: Save source file explicitly in UTF-8 encoding to preserve international characters.
How To:
open the problematic file in Visual Studio.
on the File menu click “Advanced Save Options“
from “Encoding” combo select “Unicode (UTF-8 …“
click OK.
You’re set. Commit to please the build server and rest of the team waiting for green.
In the latest Visual Studio 2017 the interface is changed a bit and you have to chose File -> Save [filename] As…. Then in the opened dialog you can chose Save with Encoding….
I've had the same problems with VS2015 vb.net project and solved it by adding <CodePage>1250</CodePage> marker to your vbproj/csproj file. I did it after <SchemaVersion> marker, rebuilt the project and it worked for me. I've had trouble with polish letters such as ż,ą etc.
You can also try the UTF-8 - 65001 but I didn't check if it works.

Resources