BestFitMappingAttribute.BestFitMapping Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the best-fit mapping behavior when converting Unicode characters to ANSI characters.
public:
property bool BestFitMapping { bool get(); };
public bool BestFitMapping { get; }
member this.BestFitMapping : bool
Public ReadOnly Property BestFitMapping As Boolean
Property Value
true
if best-fit mapping is enabled; otherwise, false
. The default is true
.
Remarks
If best-fit mapping is false
and ThrowOnUnmappableChar is true
, all Unicode characters that require conversion to ANSI format will generate an exception when passed to unmanaged code. Some characters are unmappable, even when best-fit mapping is true
. Some characters lack a best-fit representation; these characters are called unmappable. Unmappable characters are usually converted to the default '?' ANSI character.
Caution
Certain Unicode characters are converted to dangerous characters, such as the backslash '\' character, which can inadvertently change a path.