php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
codepage.c File Reference
#include <assert.h>
#include "php.h"
#include "SAPI.h"
#include <emmintrin.h>
#include "win32/console.h"
#include "cp_enc_map.c"

Go to the source code of this file.

Macros

#define ASCII_FAIL_RETURN()
 

Functions

PW32CP wchar_t * php_win32_cp_conv_utf8_to_w (const char *in, size_t in_len, size_t *out_len)
 
PW32CP wchar_t * php_win32_cp_conv_cur_to_w (const char *in, size_t in_len, size_t *out_len)
 
PW32CP wchar_t * php_win32_cp_conv_to_w (DWORD cp, DWORD flags, const char *in, size_t in_len, size_t *out_len)
 
PW32CP wchar_t * php_win32_cp_conv_ascii_to_w (const char *in, size_t in_len, size_t *out_len)
 
PW32CP char * php_win32_cp_conv_w_to_utf8 (const wchar_t *in, size_t in_len, size_t *out_len)
 
PW32CP char * php_win32_cp_conv_w_to_cur (const wchar_t *in, size_t in_len, size_t *out_len)
 
PW32CP char * php_win32_cp_conv_from_w (DWORD cp, DWORD flags, const wchar_t *in, size_t in_len, size_t *out_len)
 
PW32CP const struct php_win32_cpphp_win32_cp_get_current (void)
 
PW32CP const struct php_win32_cpphp_win32_cp_get_orig (void)
 
PW32CP const struct php_win32_cpphp_win32_cp_get_by_id (DWORD id)
 
PW32CP const struct php_win32_cpphp_win32_cp_get_by_enc (const char *enc)
 
PW32CP const struct php_win32_cpphp_win32_cp_set_by_id (DWORD id)
 
PW32CP BOOL php_win32_cp_use_unicode (void)
 
PW32CP wchar_t * php_win32_cp_env_any_to_w (const char *env)
 
PW32CP const struct php_win32_cpphp_win32_cp_do_setup (const char *enc)
 
PW32CP const struct php_win32_cpphp_win32_cp_do_update (const char *enc)
 
PW32CP const struct php_win32_cpphp_win32_cp_shutdown (void)
 
PW32CP const struct php_win32_cpphp_win32_cp_cli_do_setup (DWORD id)
 
PW32CP const struct php_win32_cpphp_win32_cp_cli_do_restore (DWORD id)
 
 PHP_FUNCTION (sapi_windows_cp_set)
 
 PHP_FUNCTION (sapi_windows_cp_get)
 
 PHP_FUNCTION (sapi_windows_cp_is_utf8)
 
 PHP_FUNCTION (sapi_windows_cp_conv)
 

Variables

ZEND_TLS const struct php_win32_cpcur_cp = NULL
 
ZEND_TLS const struct php_win32_cporig_cp = NULL
 
ZEND_TLS const struct php_win32_cpcur_out_cp = NULL
 
ZEND_TLS const struct php_win32_cporig_out_cp = NULL
 
ZEND_TLS const struct php_win32_cpcur_in_cp = NULL
 
ZEND_TLS const struct php_win32_cporig_in_cp = NULL
 

Macro Definition Documentation

◆ ASCII_FAIL_RETURN

#define ASCII_FAIL_RETURN ( )
Value:
if (PHP_WIN32_CP_IGNORE_LEN_P != out_len) { \
*out_len = 0; \
} \
return NULL;
#define PHP_WIN32_CP_IGNORE_LEN_P
Definition codepage.h:31
#define NULL
Definition gdcache.h:45

Definition at line 101 of file codepage.c.

Function Documentation

◆ PHP_FUNCTION() [1/4]

PHP_FUNCTION ( sapi_windows_cp_conv )

Definition at line 658 of file codepage.c.

◆ PHP_FUNCTION() [2/4]

PHP_FUNCTION ( sapi_windows_cp_get )

Definition at line 622 of file codepage.c.

◆ PHP_FUNCTION() [3/4]

PHP_FUNCTION ( sapi_windows_cp_is_utf8 )

Definition at line 647 of file codepage.c.

◆ PHP_FUNCTION() [4/4]

PHP_FUNCTION ( sapi_windows_cp_set )

Definition at line 593 of file codepage.c.

◆ php_win32_cp_cli_do_restore()

PW32CP const struct php_win32_cp * php_win32_cp_cli_do_restore ( DWORD id)

Definition at line 571 of file codepage.c.

◆ php_win32_cp_cli_do_setup()

PW32CP const struct php_win32_cp * php_win32_cp_cli_do_setup ( DWORD id)

Definition at line 546 of file codepage.c.

◆ php_win32_cp_conv_ascii_to_w()

PW32CP wchar_t * php_win32_cp_conv_ascii_to_w ( const char * in,
size_t in_len,
size_t * out_len )

Definition at line 106 of file codepage.c.

◆ php_win32_cp_conv_cur_to_w()

PW32CP wchar_t * php_win32_cp_conv_cur_to_w ( const char * in,
size_t in_len,
size_t * out_len )

Definition at line 87 of file codepage.c.

◆ php_win32_cp_conv_from_w()

PW32CP char * php_win32_cp_conv_from_w ( DWORD cp,
DWORD flags,
const wchar_t * in,
size_t in_len,
size_t * out_len )

Definition at line 303 of file codepage.c.

◆ php_win32_cp_conv_to_w()

PW32CP wchar_t * php_win32_cp_conv_to_w ( DWORD cp,
DWORD flags,
const char * in,
size_t in_len,
size_t * out_len )

Definition at line 96 of file codepage.c.

◆ php_win32_cp_conv_utf8_to_w()

PW32CP wchar_t * php_win32_cp_conv_utf8_to_w ( const char * in,
size_t in_len,
size_t * out_len )

Definition at line 82 of file codepage.c.

◆ php_win32_cp_conv_w_to_cur()

PW32CP char * php_win32_cp_conv_w_to_cur ( const wchar_t * in,
size_t in_len,
size_t * out_len )

Definition at line 294 of file codepage.c.

◆ php_win32_cp_conv_w_to_utf8()

PW32CP char * php_win32_cp_conv_w_to_utf8 ( const wchar_t * in,
size_t in_len,
size_t * out_len )

Definition at line 289 of file codepage.c.

◆ php_win32_cp_do_setup()

PW32CP const struct php_win32_cp * php_win32_cp_do_setup ( const char * enc)

Definition at line 497 of file codepage.c.

◆ php_win32_cp_do_update()

PW32CP const struct php_win32_cp * php_win32_cp_do_update ( const char * enc)

Definition at line 526 of file codepage.c.

◆ php_win32_cp_env_any_to_w()

PW32CP wchar_t * php_win32_cp_env_any_to_w ( const char * env)

Definition at line 428 of file codepage.c.

◆ php_win32_cp_get_by_enc()

PW32CP const struct php_win32_cp * php_win32_cp_get_by_enc ( const char * enc)

Definition at line 364 of file codepage.c.

◆ php_win32_cp_get_by_id()

PW32CP const struct php_win32_cp * php_win32_cp_get_by_id ( DWORD id)

Definition at line 338 of file codepage.c.

◆ php_win32_cp_get_current()

PW32CP const struct php_win32_cp * php_win32_cp_get_current ( void )

Definition at line 328 of file codepage.c.

◆ php_win32_cp_get_orig()

PW32CP const struct php_win32_cp * php_win32_cp_get_orig ( void )

Definition at line 333 of file codepage.c.

◆ php_win32_cp_set_by_id()

PW32CP const struct php_win32_cp * php_win32_cp_set_by_id ( DWORD id)

Definition at line 407 of file codepage.c.

◆ php_win32_cp_shutdown()

PW32CP const struct php_win32_cp * php_win32_cp_shutdown ( void )

Definition at line 540 of file codepage.c.

◆ php_win32_cp_use_unicode()

PW32CP BOOL php_win32_cp_use_unicode ( void )

Definition at line 423 of file codepage.c.

Variable Documentation

◆ cur_cp

ZEND_TLS const struct php_win32_cp* cur_cp = NULL

Definition at line 29 of file codepage.c.

◆ cur_in_cp

ZEND_TLS const struct php_win32_cp* cur_in_cp = NULL

Definition at line 33 of file codepage.c.

◆ cur_out_cp

ZEND_TLS const struct php_win32_cp* cur_out_cp = NULL

Definition at line 31 of file codepage.c.

◆ orig_cp

ZEND_TLS const struct php_win32_cp* orig_cp = NULL

Definition at line 30 of file codepage.c.

◆ orig_in_cp

ZEND_TLS const struct php_win32_cp* orig_in_cp = NULL

Definition at line 34 of file codepage.c.

◆ orig_out_cp

ZEND_TLS const struct php_win32_cp* orig_out_cp = NULL

Definition at line 32 of file codepage.c.