VS2022 (Visual Studio 2022) change file default encoding

tags: utf-8  utf-8-bom  vs2017  vs2019  vs2022

Using EditorConfig, this method allows the files saved by VS to be encoded as UTF-8 by default, without having to modify the preservation option for each file. And with the support of EditorConfig in Visual Studio software, there is no need to download plug -ins.

EditorConfig's official website:EditorConfig 。

Here is a recommended .editorConfig file configuration of EditorConfig. You need to configure it in the project root directory for your reference:

The directory of root = true# is the root directory of the project, and the file saved in this directory and subdires will take effect
 
 [*]# For all files
 Indent_Style = TAB# Inside style
 tab_width = 4# Smooth width
 Charset = UTF-8-BOM # file encoding format, Visual Studio uses UTF-8-BOM to prevent warning
 END_OF_LINE = CRLF# e e Format, Windows is generally CRLF, linux is generally lf, change according to needs
 Insert_final_newline = True #File End to add a change symbol to prevent warning

Intelligent Recommendation

Visual Studio 2022 installation tutorial (detailed explanation of thousands of figures), take you to install and run VS2022 and background map settings

VS2022 latest and most complete installation tutorial I'm glad you opened this blog. Next, let's install and use VS2022, let Articles directory VS2022 latest and most complete installation tutorial 1....

Visual Studio 2022

Recently, Microsoft launched a preview version of Visual Studio 2022 and wants to try it.Click here official website to download。 Visual Studio 2022 Preview 2 is released! July 14, 2021 We are pleased...

Visual Studio 2022 Boost_1_79_07

1 Download boost 1.97 Boost C++ Librarieshttps://www.boost.org/ 2 Compile boost 2.1 Open     2.2 Compile boost 2.3 Environmental Construction     3 Boost project   4 test code...

Visual Studio 2022 Interactivedatadisplay.wpf

Foreword Recently, I want to engage in the interface of a oscilloscope display. Based on C#, I found:InteractiveDataDisplay.WPFThis is a C# WPF library of Microsoft. Through this library, you can easi...

Visual Studio 2008 default file code page

program originally thought that only non-English speaking countries, English is the international watch people when there will be code page problem, but still found that English people also like to us...

More Recommendation

Microsoft Visual Studio 2022 How to customize the background (detailed) Visual studio 2022 How to change the background and slideshow (custom background)

1. First install visual studio 2022 1. Open visual studio 2022 1. Create a new project, the project name doesn't matter After entering the editing page, click Expand>Management Expand>Online Sea...

Successfully resolved. It prompts that the visual studio installer cannot download the installation file. Please check the internet connection VS2022 community

When installing VS2022 Community Edition,Tip: Visual studio installer cannot download the installation file, please check the internet connection Solution: 1. Open "Network and Internet Settings&...

Visual Studio sets the default encoding format to UTF-8 or GB2312-80 and how to display the file without advanced saving options

The default encoding format of Visual Studio is UTF-8, but it has a built-in encoding format for various languages, which can be selected according to needs. Generally, UTF-8 can be reserved, because ...

VS (Visual Studio) change file coding

Foreword When using VS for development, the default file encoding is GB2312, but experienced programmers prefer the encoding of UTF-8, because the UTF-8 compatibility is higher and widely used. So how...

visual studio 2022 displays "The system cannot find the specified file"

Visual Studio "Cannot start program" system cannot find the specified file Solution_Bilibili_bilibili First look at the method of up. After I use it, at least the system cannot find the spec...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top