sapi_windows_cp_conv()

sapi_windows_cp_conv() — Convert string from one codepage to another.

Built-in function of PHP 8.5. The manual lists it as available in PHP 7 >= 7.1.0, PHP 8. This page is the reference card: signature, parameters and return value, plus the changelog and the example the manual provides.

Signature

sapi_windows_cp_conv(int|string $in_codepage, int|string $out_codepage, string $subject): ?string

Parameters

ParameterTypeWhat it takes
$in_codepageint|stringThe codepage of the subject string. Either the codepage name or identifier.
$out_codepageint|stringThe codepage to convert the subject string to. Either the codepage name or identifier.
$subjectstringThe string to convert.

Return value

The subject string converted to out_codepage, or null on failure.

Example

The PHP manual ships no example for sapi_windows_cp_conv(); the signature and the parameter table above are the contract.

See also

sapi_windows_cp_get(), iconv()

All PHP 8.5 built-in functions

Reference card built from the PHP manual page sapi_windows_cp_conv() (PHP documentation, CC BY 3.0). The page is generated from the manual, so the wording of the parameter and return value text follows php.net.