PHP Function Reference

PHP sapi_windows_cp_conv() Function



The PHP sapi_windows_cp_conv() function is used to convert string from one codepage to another.

Syntax

sapi_windows_cp_conv(in_codepage, out_codepage, subject)

Parameters

in_codepage Required. Specify the codepage of the subject string. Either the codepage name or identifier.
out_codepage Required. Specify the codepage to convert the subject string to. Either the codepage name or identifier.
subject Required. Specify the string to convert.

Return Value

Returns the subject string converted to out_codepage, or null on failure.

Exceptions

Issues an E_WARNING level errors, if invalid codepages are given, or if the subject is not valid for in_codepage.


❮ PHP Miscellaneous Reference