php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
codepage.h File Reference

Go to the source code of this file.

Data Structures

struct  php_win32_cp
 

Macros

#define PW32CP   __declspec(dllimport)
 
#define PHP_WIN32_CP_IGNORE_LEN   (0)
 
#define PHP_WIN32_CP_IGNORE_LEN_P   ((size_t *)-1)
 
#define php_win32_cp_setup()
 
#define php_win32_cp_update()
 
#define php_win32_cp_cli_setup()
 
#define php_win32_cp_cli_update()
 
#define php_win32_cp_cli_restore()
 
#define php_win32_cp_utf8_to_w(in)
 
#define php_win32_cp_cur_to_w(in)
 
#define php_win32_cp_ascii_to_w(in)
 
#define php_win32_cp_w_to_utf8(in)
 
#define php_win32_cp_w_to_cur(in)
 
#define php_win32_cp_any_to_w(in)
 
#define php_win32_cp_w_to_any(in)
 
#define PHP_WIN32_CP_W_TO_ANY_ARRAY(aw, aw_len, aa, aa_len)
 
#define PHP_WIN32_CP_FREE_ARRAY(a, a_len)
 

Functions

PW32CP BOOL php_win32_cp_use_unicode (void)
 
PW32CP const struct php_win32_cpphp_win32_cp_do_setup (const char *)
 
PW32CP const struct php_win32_cpphp_win32_cp_do_update (const char *)
 
PW32CP const struct php_win32_cpphp_win32_cp_shutdown (void)
 
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_set_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_cli_do_setup (DWORD)
 
PW32CP const struct php_win32_cpphp_win32_cp_cli_do_restore (DWORD)
 
PW32CP wchar_t * php_win32_cp_conv_to_w (DWORD in_cp, DWORD flags, const char *in, size_t in_len, size_t *out_len)
 
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_ascii_to_w (const char *in, size_t in_len, size_t *out_len)
 
PW32CP char * php_win32_cp_conv_from_w (DWORD out_cp, DWORD flags, const wchar_t *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 wchar_t * php_win32_cp_env_any_to_w (const char *env)
 

Macro Definition Documentation

◆ php_win32_cp_any_to_w

#define php_win32_cp_any_to_w ( in)
Value:
php_win32_cp_conv_any_to_w(in, PHP_WIN32_CP_IGNORE_LEN, PHP_WIN32_CP_IGNORE_LEN_P)
#define PHP_WIN32_CP_IGNORE_LEN_P
Definition codepage.h:31
#define PHP_WIN32_CP_IGNORE_LEN
Definition codepage.h:30

Definition at line 115 of file codepage.h.

◆ php_win32_cp_ascii_to_w

#define php_win32_cp_ascii_to_w ( in)
Value:
PW32CP wchar_t * php_win32_cp_conv_ascii_to_w(const char *in, size_t in_len, size_t *out_len)
Definition codepage.c:106

Definition at line 68 of file codepage.h.

◆ php_win32_cp_cli_restore

#define php_win32_cp_cli_restore ( )
Value:
PW32CP const struct php_win32_cp * php_win32_cp_cli_do_restore(DWORD id)
Definition codepage.c:571

Definition at line 58 of file codepage.h.

◆ php_win32_cp_cli_setup

#define php_win32_cp_cli_setup ( )
Value:
PW32CP const struct php_win32_cp * php_win32_cp_cli_do_setup(DWORD id)
Definition codepage.c:546

Definition at line 55 of file codepage.h.

◆ php_win32_cp_cli_update

#define php_win32_cp_cli_update ( )
Value:

Definition at line 56 of file codepage.h.

◆ php_win32_cp_cur_to_w

#define php_win32_cp_cur_to_w ( in)
Value:
PW32CP wchar_t * php_win32_cp_conv_cur_to_w(const char *in, size_t in_len, size_t *out_len)
Definition codepage.c:87

Definition at line 66 of file codepage.h.

◆ PHP_WIN32_CP_FREE_ARRAY

#define PHP_WIN32_CP_FREE_ARRAY ( a,
a_len )
Value:
do { \
int i; \
for (i = 0; i < a_len; i++) { \
free(a[i]); \
} \
free(a); \
} while (0);
$obj a
Definition test.php:84

Definition at line 139 of file codepage.h.

◆ PHP_WIN32_CP_IGNORE_LEN

#define PHP_WIN32_CP_IGNORE_LEN   (0)

Definition at line 30 of file codepage.h.

◆ PHP_WIN32_CP_IGNORE_LEN_P

#define PHP_WIN32_CP_IGNORE_LEN_P   ((size_t *)-1)

Definition at line 31 of file codepage.h.

◆ php_win32_cp_setup

#define php_win32_cp_setup ( )
Value:
PW32CP const struct php_win32_cp * php_win32_cp_do_setup(const char *enc)
Definition codepage.c:497
#define NULL
Definition gdcache.h:45

Definition at line 45 of file codepage.h.

◆ php_win32_cp_update

#define php_win32_cp_update ( )
Value:
PW32CP const struct php_win32_cp * php_win32_cp_do_update(const char *enc)
Definition codepage.c:526

Definition at line 47 of file codepage.h.

◆ php_win32_cp_utf8_to_w

#define php_win32_cp_utf8_to_w ( in)
Value:
PW32CP wchar_t * php_win32_cp_conv_utf8_to_w(const char *in, size_t in_len, size_t *out_len)
Definition codepage.c:82

Definition at line 64 of file codepage.h.

◆ php_win32_cp_w_to_any

#define php_win32_cp_w_to_any ( in)
Value:
php_win32_cp_conv_w_to_any(in, PHP_WIN32_CP_IGNORE_LEN, PHP_WIN32_CP_IGNORE_LEN_P)

Definition at line 124 of file codepage.h.

◆ PHP_WIN32_CP_W_TO_ANY_ARRAY

#define PHP_WIN32_CP_W_TO_ANY_ARRAY ( aw,
aw_len,
aa,
aa_len )
Value:
do { \
int i; \
aa_len = aw_len; \
aa = (char **) malloc(aw_len * sizeof(char *)); \
if (!aa) { \
break; \
} \
for (i = 0; i < aw_len; i++) { \
aa[i] = php_win32_cp_w_to_any(aw[i]); \
} \
} while (0);
#define php_win32_cp_w_to_any(in)
Definition codepage.h:124

Definition at line 126 of file codepage.h.

◆ php_win32_cp_w_to_cur

#define php_win32_cp_w_to_cur ( in)
Value:
PW32CP char * php_win32_cp_conv_w_to_cur(const wchar_t *in, size_t in_len, size_t *out_len)
Definition codepage.c:294

Definition at line 73 of file codepage.h.

◆ php_win32_cp_w_to_utf8

#define php_win32_cp_w_to_utf8 ( in)
Value:
PW32CP char * php_win32_cp_conv_w_to_utf8(const wchar_t *in, size_t in_len, size_t *out_len)
Definition codepage.c:289

Definition at line 71 of file codepage.h.

◆ PW32CP

#define PW32CP   __declspec(dllimport)

Definition at line 27 of file codepage.h.

Function Documentation

◆ 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 out_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 in_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.