Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft EdgeMore info about Internet Explorer and Microsoft Edge
Table of contentsExit editor mode

Encodings and Line Breaks

Feedback

In this article

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, seeVisual Studio documentation. We recommend upgrading to the latest version of Visual Studio.Download it here

In Visual Studio you can use theFile/Advanced Save Options settings to determine the type of line break characters you want. You can also change the encoding of a file with the same settings.

Note

If you have certain types of development settings (Visual Basic, F#, Web Development) you may not seeAdvanced Save Options on the menu. To change your settings (for example to General), openTools / Import and Export Settings. For more information, seeCustomizing Development Settings in Visual Studio.

In Visual Studio the following characters are interpreted as line breaks:

  • CRLF: Carriage return + line feed, Unicode characters 000D + 000A

  • LF: Line feed, Unicode character 000A

  • NEL: Next line, Unicode character 0085

  • LS: Line separator, Unicode character 2028

  • PS: Paragraph separator, Unicode character 2029

    Text that is copied from other applications keeps the original encoding and line break characters. For example, when you copy text from Notepad and paste it into a text file in Visual Studio, the text has the same settings that it had in Notepad.

    When you open a file that has a different line break characters, you may see a dialog box that asks whether the inconsistent line break characters should be normalized and which type of line breaks to choose.


  • Last updated on

In this article