[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'System' (#rtl)

# SetMultiByteConversionCodePage

Set codepage for conversions from multi-byte strings to single-byte strings

## Declaration

Source position: systemh.inc line 1234

`procedure SetMultiByteConversionCodePage(`
`CodePage: TSystemCodePage`
`);`

## Description

SetMultiByteConversionCodePage sets DefaultSystemCodePage to CodePage. The effect of this change is that the default codepage used to translate multi-byte (UTF-16) strings to single-byte codepage-aware strings changes, and code page conversions will be done to the new codepage.

Do not set DefaultSystemCodePage directly, as additional actions may need to be done when changing the code page.

When the DefaultSystemCodePage changes and you use the TEncoding classes, you must call TEncoding.FreeEncodings to regenerate the default encoding using the new code page.

## See also

DefaultSystemCodePage |  | Current system codepage.
SetMultiByteFileSystemCodePage |  | Set codepage used when passing strings to OS single-byte file system APIs
SetMultiByteRTLFileSystemCodePage |  | Set codepage used when interpreting strings from OS single-byte file system APIs