Skip to content

Commit 1092fa5

Browse files
author
Colin Robertson
authored
Merge pull request MicrosoftDocs#653 from drvoss/patch-19
Update generic-text-mappings-in-tchar-h.md
2 parents d26c11c + b7917b4 commit 1092fa5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/text/generic-text-mappings-in-tchar-h.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.assetid: 01e1bb74-5a01-4093-8720-68b6c1fdda80
99

1010
To simplify the transporting of code for international use, the Microsoft run-time library provides Microsoft-specific generic-text mappings for many data types, routines, and other objects. You can use these mappings, which are defined in tchar.h, to write generic code that can be compiled for single-byte, multibyte, or Unicode character sets, depending on a manifest constant that you define by using a `#define` statement. Generic-text mappings are Microsoft extensions that are not ANSI compatible.
1111

12-
By using the tchar.h, you can build single-byte, Multibyte Character Set (MBCS), and Unicode applications from the same sources. tchar.h defines macros (which have the prefix `_tcs`) that, with the correct preprocessor definitions, map to `str`, `_mbs`, or `wcs` functions, as appropriate. To build MBCS, define the symbol `_MBCS`. To build Unicode, define the symbol `_UNICODE`. To build a single-byte application, define neither (the default). By default, `_MBCS` is defined for MFC applications.
12+
By using the tchar.h, you can build single-byte, Multibyte Character Set (MBCS), and Unicode applications from the same sources. tchar.h defines macros (which have the prefix `_tcs`) that, with the correct preprocessor definitions, map to `str`, `_mbs`, or `wcs` functions, as appropriate. To build MBCS, define the symbol `_MBCS`. To build Unicode, define the symbol `_UNICODE`. To build a single-byte application, define neither (the default). By default, `_UNICODE` is defined for MFC applications.
1313

1414
The `_TCHAR` data type is defined conditionally in tchar.h. If the symbol `_UNICODE` is defined for your build, `_TCHAR` is defined as **wchar_t**; otherwise, for single-byte and MBCS builds, it is defined as **char**. (**wchar_t**, the basic Unicode wide-character data type, is the 16-bit counterpart to an 8-bit signed **char**.) For international applications, use the `_tcs` family of functions, which operate in `_TCHAR` units, not bytes. For example, `_tcsncpy` copies `n` `_TCHARs`, not `n` bytes.
1515

0 commit comments

Comments
 (0)