Skip to content

Commit 5dcdd7f

Browse files
author
3836425+corob-msft@users.noreply.github.com
committed
Acrolinx pass.
1 parent 5dcee92 commit 5dcdd7f

5 files changed

+67
-73
lines changed
Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,49 @@
11
---
2-
description: "Learn more about: /execution-charset (Set Execution Character Set)"
3-
title: "/execution-charset (Set Execution Character Set)"
4-
ms.date: "02/06/2019"
2+
description: "Learn more about: /execution-charset (Set execution character set)"
3+
title: "/execution-charset (Set execution character set)"
4+
ms.date: 01/31/2022
55
f1_keywords: ["execution-charset", "/execution-charset"]
66
helpviewer_keywords: ["/execution-charset compiler option", "-execution-charset compiler option"]
77
ms.assetid: 0e02f487-2236-45bc-95f3-5760933a8f96
88
---
9-
# /execution-charset (Set Execution Character Set)
9+
# `/execution-charset` (Set execution character set)
1010

11-
Lets you specify the execution character set for your executable.
11+
This option lets you specify the execution character set for your executable.
1212

1313
## Syntax
1414

15-
```
16-
/execution-charset:[IANA_name|.CPID]
17-
```
15+
> **`/execution-charset:`**[*`IANA_name`* | *`.CPID`*]
1816
1917
## Arguments
2018

21-
*IANA_name*<br/>
19+
*`IANA_name`*\
2220
The IANA-defined character set name.
2321

24-
*CPID*<br/>
25-
The code page identifier.
22+
*`.CPID`*\
23+
The code page identifier, preceded by a `.` character.
2624

2725
## Remarks
2826

29-
You can use the **/execution-charset** option to specify an execution character set. The execution character set is the encoding used for the text of your program that is input to the compilation phase after all preprocessing steps. This character set is used for the internal representation of any string or character literals in the compiled code. Set this option to specify the extended execution character set to use when your source files include characters that are not representable in the basic execution character set. You can use either the IANA or ISO character set name, or a dot (.) followed by a 3 to 5 digit decimal code page identifier to specify the character set to use. For a list of supported code page identifiers and character set names, see [Code Page Identifiers](/windows/win32/Intl/code-page-identifiers).
27+
You can use the **`/execution-charset`** option to specify an execution character set. The execution character set is the encoding used for the text of your program that is input to the compilation phase after all preprocessing steps. This character set is used for the internal representation of any string or character literals in the compiled code. Set this option to specify the extended execution character set to use when your source files include characters that are not representable in the basic execution character set. You can use either the IANA or ISO character set name, or a dot (`.`) followed by 3-5 decimal digits that specify the code page identifier of the character set to use. For a list of supported code page identifiers and character set names, see [Code Page Identifiers](/windows/win32/Intl/code-page-identifiers).
3028

31-
By default, Visual Studio detects a byte-order mark to determine if the source file is in an encoded Unicode format, for example, UTF-16 or UTF-8. If no byte-order mark is found, it assumes the source file is encoded using the current user code page, unless you have specified a character set name or code page by using the **/source-charset** option or the **/utf-8** option. Visual Studio allows you to save your C++ source code by using any of several character encodings. For information about source and execution character sets, see [Character Sets](../../cpp/character-sets.md) in the language documentation.
29+
By default, Visual Studio detects a byte-order mark to determine if the source file is in an encoded Unicode format, for example, UTF-16 or UTF-8. If no byte-order mark is found, it assumes that the source file is encoded in the current user code page, unless you used the **`/source-charset`** or **`/utf-8`** option to specify a character set name or code page. Visual Studio allows you to save your C++ source code in any of several character encodings. For information about source and execution character sets, see [Character sets](../../cpp/character-sets.md) in the language documentation.
3230

33-
If you want to set both the source character set and the execution character set to UTF-8, you can use the **/utf-8** compiler option as a shortcut. It is equivalent to specifying **/source-charset:utf-8 /execution-charset:utf-8** on the command line. Any of these options also enables the **/validate-charset** option by default.
31+
If you want to set both the source character set and the execution character set to UTF-8, you can use the **`/utf-8*`** compiler option as a shortcut. It's equivalent to **`/source-charset:utf-8 /execution-charset:utf-8`** on the command line. Any of these options also enables the **`/validate-charset`** option by default.
3432

3533
### To set this compiler option in the Visual Studio development environment
3634

37-
1. Open the project **Property Pages** dialog box. For more information, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
35+
1. Open the **Property Pages** dialog box for your project. For more information, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
3836

3937
1. Select the **Configuration Properties** > **C/C++** > **Command Line** property page.
4038

41-
1. In **Additional Options**, add the **/execution-charset** option, and specify your preferred encoding.
39+
1. In **Additional Options**, add the **`/execution-charset`** option, and specify your preferred encoding.
4240

4341
1. Choose **OK** to save your changes.
4442

4543
## See also
4644

47-
[MSVC Compiler Options](compiler-options.md)<br/>
48-
[MSVC Compiler Command-Line Syntax](compiler-command-line-syntax.md)<br/>
49-
[/source-charset (Set Source Character Set)](source-charset-set-source-character-set.md)<br/>
50-
[/utf-8 (Set source and execution character sets to UTF-8)](utf-8-set-source-and-executable-character-sets-to-utf-8.md)<br/>
51-
[/validate-charset (Validate for compatible characters)](validate-charset-validate-for-compatible-characters.md)
45+
[MSVC compiler options](compiler-options.md)\
46+
[MSVC compiler command-line syntax](compiler-command-line-syntax.md)\
47+
[`/source-charset` (Set source character set)](source-charset-set-source-character-set.md)\
48+
[`/utf-8` (Set source and execution character sets to UTF-8)](utf-8-set-source-and-executable-character-sets-to-utf-8.md)\
49+
[`/validate-charset` (Validate for compatible characters)](validate-charset-validate-for-compatible-characters.md)
Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,51 @@
11
---
2-
description: "Learn more about: /source-charset (Set Source Character Set)"
3-
title: "/source-charset (Set Source Character Set)"
4-
ms.date: "02/06/2019"
2+
description: "Learn more about: /source-charset (Set source character set)"
3+
title: "/source-charset (Set source character set)"
4+
ms.date: 01/31/2022
55
f1_keywords: ["source-charset", "/source-charset"]
66
helpviewer_keywords: ["/execution-charset compiler option"]
77
ms.assetid: d3c5bf7f-526d-4ee4-acc5-c1a02a4fc481
88
---
9-
# /source-charset (Set Source Character Set)
9+
# `/source-charset` (Set source character set)
1010

11-
Lets you specify the source character set for your executable.
11+
This option lets you specify the source character set for your executable.
1212

1313
## Syntax
1414

15-
```
16-
/source-charset:[IANA_name|.CPID]
17-
```
15+
> **`/source-charset:`**[*`IANA_name`* | *`.CPID`*]
1816
1917
## Arguments
2018

21-
**IANA_name**<br/>
19+
*`IANA_name`*\
2220
The IANA-defined character set name.
2321

24-
**CPID**<br/>
25-
The code page identifier as a decimal number.
22+
*`.CPID`*\
23+
The code page identifier as a decimal number, preceded by a `.` character.
2624

2725
## Remarks
2826

29-
You can use the **/source-charset** option to specify an extended source character set to use when your source files include characters that are not represented in the basic source character set. The source character set is the encoding used to interpret the source text of your program into the internal representation used as input to the preprocessing phases before compilation. The internal representation is then converted to the execution character set to store string and character values in the executable. You can use either the IANA or ISO character set name, or a dot (.) followed by a 3 to 5 digit decimal code page identifier to specify the character set to use. For a list of supported code page identifiers and character set names, see [Code Page Identifiers](/windows/win32/Intl/code-page-identifiers).
27+
You can use the **`/source-charset`** option to specify an extended source character set to use when your source files include characters that are not represented in the basic source character set. The source character set is the encoding used to interpret the source text of your program. It's converted into the internal representation used as input to the preprocessing phases before compilation. The internal representation is then converted to the execution character set to store string and character values in the executable. You can use either the IANA or ISO character set name, or a dot (`.`) followed by 3-5 decimal digits that specify the code page identifier of the character set to use. For a list of supported code page identifiers and character set names, see [Code Page Identifiers](/windows/win32/Intl/code-page-identifiers).
3028

31-
By default, Visual Studio detects a byte-order mark to determine if the source file is in an encoded Unicode format, for example, UTF-16 or UTF-8. If no byte-order mark is found, it assumes the source file is encoded using the current user code page, unless you specify a character set name or code page by using the **/source-charset** option. Visual Studio allows you to save your C++ source code by using any of several character encodings. For more information about source and execution character sets, see [Character Sets](../../cpp/character-sets.md) in the language documentation.
29+
By default, Visual Studio detects a byte-order mark to determine if the source file is in an encoded Unicode format, for example, UTF-16 or UTF-8. If no byte-order mark is found, it assumes that the source file is encoded in the current user code page, unless you use the **`/source-charset`** or **`/utf-8`** option to specify a character set name or code page. Visual Studio allows you to save your C++ source code in any of several character encodings. For more information about source and execution character sets, see [Character sets](../../cpp/character-sets.md) in the language documentation.
3230

33-
The source character set you supply must map the 7-bit ASCII characters to the same code points in your character set, or many compilation errors are likely to follow. Your source character set must also be mappable to the extended Unicode character set encodable by UTF-8. Characters that are not encodable in UTF-8 are represented by an implementation-specific substitute. The Microsoft compiler uses a question mark for these characters.
31+
The source character set you supply must map the 7-bit ASCII characters to the same code points in your character set, or many compilation errors are likely to follow. Your source character set must also have a mapping to the extended Unicode character set of UTF-8. Characters that have no equivalent in UTF-8 are represented by an implementation-specific substitute. The Microsoft compiler uses a question mark for these characters.
3432

35-
If you want to set both the source character set and the execution character set to UTF-8, you can use the **/utf-8** compiler option as a shortcut. It is equivalent to specifying **`/source-charset:utf-8 /execution-charset:utf-8`** on the command line. Any of these options also enables the **/validate-charset** option by default.
33+
If you want to set both the source character set and the execution character set to UTF-8, you can use the **`/utf-8`** compiler option as a shortcut. It's equivalent to **`/source-charset:utf-8 /execution-charset:utf-8`** on the command line. Any of these options also enables the **`/validate-charset`** option by default.
3634

3735
### To set this compiler option in the Visual Studio development environment
3836

39-
1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
37+
1. Open the **Property Pages** dialog box for your project. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
4038

4139
1. Select the **Configuration Properties** > **C/C++** > **Command Line** property page.
4240

43-
1. In **Additional Options**, add the *`/source-charset`* option, and specify your preferred encoding.
41+
1. In **Additional Options**, add the **`/source-charset`** option, and specify your preferred encoding.
4442

4543
1. Choose **OK** to save your changes.
4644

4745
## See also
4846

49-
[MSVC Compiler Options](compiler-options.md)<br/>
50-
[MSVC Compiler Command-Line Syntax](compiler-command-line-syntax.md)<br/>
51-
[/execution-charset (Set Execution Character Set)](execution-charset-set-execution-character-set.md)<br/>
52-
[/utf-8 (Set source and execution character sets to UTF-8)](utf-8-set-source-and-executable-character-sets-to-utf-8.md)<br/>
53-
[/validate-charset (Validate for compatible characters)](validate-charset-validate-for-compatible-characters.md)
47+
[MSVC compiler options](compiler-options.md)\
48+
[MSVC compiler command-line syntax](compiler-command-line-syntax.md)\
49+
[`/execution-charset` (Set execution character set)](execution-charset-set-execution-character-set.md)\
50+
[`/utf-8` (Set source and execution character sets to UTF-8)](utf-8-set-source-and-executable-character-sets-to-utf-8.md)\
51+
[`/validate-charset` (Validate for compatible characters)](validate-charset-validate-for-compatible-characters.md)

docs/build/reference/utf-8-set-source-and-executable-character-sets-to-utf-8.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: "Learn more about: `/utf-8` (Set source and execution character sets to UTF-8)"
33
title: "/utf-8 (Set source and execution character sets to UTF-8)"
4-
ms.date: "04/26/2020"
4+
ms.date: 01/31/2022
55
f1_keywords: ["/utf-8"]
66
helpviewer_keywords: ["/utf-8 compiler option"]
77
ms.assetid: f0e1f3cb-6cae-46eb-9483-04ed13d9b504
@@ -19,7 +19,7 @@ Specifies both the source character set and the execution character set as UTF-8
1919

2020
You can use the **`/utf-8`** option to specify both the source and execution character sets as encoded by using UTF-8. It's equivalent to specifying **`/source-charset:utf-8 /execution-charset:utf-8`** on the command line. Any of these options also enables the **`/validate-charset`** option by default. For a list of supported code page identifiers and character set names, see [Code Page Identifiers](/windows/win32/Intl/code-page-identifiers).
2121

22-
By default, Visual Studio detects a byte-order mark to determine if the source file is in an encoded Unicode format, for example, UTF-16 or UTF-8. If no byte-order mark is found, it assumes the source file is encoded using the current user code page, unless you've specified a code page by using **`/utf-8`** or the **`/source-charset`** option. Visual Studio allows you to save your C++ source code by using any of several character encodings. For information about source and execution character sets, see [Character Sets](../../cpp/character-sets.md) in the language documentation.
22+
By default, Visual Studio detects a byte-order mark to determine if the source file is in an encoded Unicode format, for example, UTF-16 or UTF-8. If no byte-order mark is found, it assumes that the source file is encoded in the current user code page, unless you've specified a code page by using **`/utf-8`** or the **`/source-charset`** option. Visual Studio allows you to save your C++ source code in any of several character encodings. For information about source and execution character sets, see [Character sets](../../cpp/character-sets.md) in the language documentation.
2323

2424
## Set the option in Visual Studio or programmatically
2525

@@ -39,8 +39,8 @@ By default, Visual Studio detects a byte-order mark to determine if the source f
3939

4040
## See also
4141

42-
[MSVC Compiler Options](compiler-options.md)<br/>
43-
[MSVC Compiler Command-Line Syntax](compiler-command-line-syntax.md)<br/>
44-
[/execution-charset (Set Execution Character Set)](execution-charset-set-execution-character-set.md)<br/>
45-
[/source-charset (Set Source Character Set)](source-charset-set-source-character-set.md)<br/>
46-
[/validate-charset (Validate for compatible characters)](validate-charset-validate-for-compatible-characters.md)
42+
[MSVC compiler options](compiler-options.md)\
43+
[MSVC compiler command-line syntax](compiler-command-line-syntax.md)\
44+
[`/execution-charset` (Set execution character set)](execution-charset-set-execution-character-set.md)\
45+
[`/source-charset` (Set source character set)](source-charset-set-source-character-set.md)\
46+
[`/validate-charset` (Validate for compatible characters)](validate-charset-validate-for-compatible-characters.md)

0 commit comments

Comments
 (0)