Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<sapi_windows_cp_convsapi_windows_cp_is_utf8>
^Misc. FunctionsLast updated: Mon, 26 Oct 2026

sapi_windows_cp_get

(PHP 7 >= 7.1.0, PHP 8)

sapi_windows_cp_get — Get current codepage

Description

function sapi_windows_cp_get(string $kind = ""): int

Gets the current codepage.

Parameters

kind

The kind of operating system codepage to get, either 'ansi' or 'oem'. Any other value refers to the current codepage of the process.

Return Values

If kind is 'ansi', the current ANSI code page of the operating system is returned. If kind is 'oem', the current OEM code page of the operating system is returned. Otherwise, the current codepage of the process is returned.

See Also


<sapi_windows_cp_convsapi_windows_cp_is_utf8>
^Misc. FunctionsLast updated: Mon, 26 Oct 2026