Skip to content

Commit 01dcb1f

Browse files
Merge pull request #10539 from MicrosoftDocs/main638700806523457131sync_temp
For protected branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents 58ae60d + 57eb2e4 commit 01dcb1f

23 files changed

+511
-393
lines changed

docs/debugger/getting-started-with-the-debugger-cpp.md

Lines changed: 231 additions & 168 deletions
Large diffs are not rendered by default.
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

docs/debugger/walkthrough-debugging-a-multithreaded-application.md

Lines changed: 78 additions & 91 deletions
Large diffs are not rendered by default.

docs/ide/encodings-and-line-breaks.md

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: Encoding and line break characters
3-
description: Learn about the characters that Visual Studio interprets as line breaks and how original encoding and line break characters are maintained.
4-
ms.date: 11/04/2016
5-
ms.topic: conceptual
3+
description: Explore the special characters that Visual Studio interprets as line breaks and separators and understand how to configure and maintain your encoding and line break.
4+
ms.date: 12/17/2024
5+
ms.topic: concept-article
66
f1_keywords:
77
- vs.Encoding
88
helpviewer_keywords:
@@ -16,41 +16,46 @@ author: Mikejo5000
1616
ms.author: mikejo
1717
manager: mijacobs
1818
ms.subservice: general-ide
19+
20+
#customer intent: As a developer, I want to understand how Visual Studio interprets line breaks and separators so I can ensure my desired encoding and line breaks are maintained.
1921
---
20-
# Encodings and line endings
2122

22-
The following characters are interpreted as line breaks in Visual Studio:
23+
# Encodings and line endings
2324

24-
- CR LF: Carriage return + line feed, Unicode characters 000D + 000A
25+
Special characters are commonly used to format code, file data, and program output. You might use the tab key to control spacing across a single line or apply a soft or hard line break to format multi-line data. Visual Studio interprets specific characters as line breaks or separators. The following table lists the recognized characters and their corresponding Unicode values:
2526

26-
- LF: Line feed, Unicode character 000A
27+
| Character | Description | Unicode value |
28+
| --- | --- | --- |
29+
| **CR LF** | Carriage return plus Line feed | 000D plus 000A |
30+
| **LF** | Line feed | 000A |
31+
| **NEL** | Next line | 0085 |
32+
| **LS** | Line separator | 2028 |
33+
| **PS** | Paragraph separator | 2029 |
2734

28-
- NEL: Next line, Unicode character 0085
35+
When you copy text from another file or application, Visual Studio maintains the original encoding and line break characters in the copied value. For example, text copied from a Notepad file and pasted into a Visual Studio file use the original settings applied in Notepad. If you open a file that has unrecognized line break characters, Visual Studio might prompt you for instructions to normalize the inconsistent characters. You might also need to specify the type of line breaks to apply to the imported data.
2936

30-
- LS: Line separator, Unicode character 2028
37+
## Configure encoding for special characters
3138

32-
- PS: Paragraph separator, Unicode character 2029
39+
You can specify the type of line break characters to apply to your data with the **Advanced Save Options** dialog. Visual Studio applies your desired encoding when you save your project files:
3340

34-
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.
41+
:::image type="content" source="media/advanced-save-options-dialog.png" border="false" alt-text="Screenshot of the Advanced Save Options dialog in Visual Studio.":::
3542

36-
When you open a file that has 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.
43+
The **Advanced Save Options** dialog is available when you select **File** > **Save \<filename\> As**. In the **Save File As** dialog, expand the **Save** dropdown list and select **Save with Encoding**:
3744

38-
## Advanced save options
45+
:::image type="content" source="media/save-with-encoding.png" border="false" alt-text="Screenshot that shows how to select the Save with Encoding option in Visual Studio.":::
3946

40-
You can use the **File** > **Advanced Save Options** dialog box to determine the type of line break characters you want. You can also change the encoding of a file with the same settings.
47+
You can also place the **Advanced Save Options** command directly on the **File** menu for quick access:
4148

42-
![Advanced Save Options dialog box](media/line_endings.png)
49+
1. On the Visual Studio toolbar, select **Tools** > **Customize**.
50+
1. In the **Customize** dialog, select the **Commands** tab.
51+
1. Choose the **Menu bar** option, select **File** in the corresponding dropdown list, and then select **Add Command**.
52+
1. In the **Add Command** dialog, under **Categories**, select **File**.
53+
1. In the **Commands** list, select **Advanced Save Options**, and then select **OK**.
54+
1. In the **Customize** dialog, select the **Advanced Save Options** command and use the **Move Up** and **Move Down** actions to change the position of the command in the menu.
55+
1. Select **Close** to apply the menu change.
4356

44-
> [!NOTE]
45-
> If you don't see **Advanced Save Options** on the **File** menu, you can add it.
46-
> 1. Choose **Tools**, **Customize**,
47-
> 1. Choose the **Commands** tab, select the **Menu bar** radio button and from the corresponding drop-down list choose **File**. Choose the **Add Command** button.
48-
> 1. In the **Add Command** dialog box, under **Categories**, choose **File**, and then in the **Commands** list, choose **Advanced Save Options**. Choose **OK** button.
49-
> 1. Use the **Move Up** and **Move Down** buttons to move the command to any place in the menu. Choose **Close** to close the **Customize** dialog box.
50-
> For more information, see [Customize menus and toolbars](../ide/how-to-customize-menus-and-toolbars-in-visual-studio.md#customizing_menu).
51-
>
52-
> Alternatively, you can access the **Advanced Save Options** dialog box by choosing **File** > **Save \<file\> As**. In the **Save File As** dialog box, choose the drop-down triangle next to the **Save** button and then choose **Save with encoding**.
57+
For more information, see [Customize menus and toolbars](./how-to-customize-menus-and-toolbars-in-visual-studio.md#customize-a-menu-or-a-toolbar).
5358

5459
## Related content
5560

56-
- [Features of the code editor](../ide/writing-code-in-the-code-and-text-editor.md)
61+
- [Features of the code editor](./writing-code-in-the-code-and-text-editor.md)
47.8 KB
Loading

docs/ide/media/line_endings.png

-8.86 KB
Binary file not shown.
432 Bytes
Loading
203 Bytes
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)