Editare

Partajați prin


BestFitMappingAttribute.BestFitMapping Property

Definition

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.

Applies to

See also