|
HOME
SIP/media Features
High Performance SIP
Small Footprint SIP
Symbian Port
FAQ
Documentation
Licensing
Download
Development (Trac)
Projects using pjsip
Mailing List
Open Source Links
About: PJLIB, PJLIB-UTIL, PJSIP, and PJMEDIA are created by: Benny Prijono <bennylp pjsip.org>
|
|
Home --> Documentations --> PJLIB Reference
Files |
| file | unicode.h |
| | Provides Unicode conversion for Unicode OSes.
|
Defines |
| #define | PJ_DECL_UNICODE_TEMP_BUF(var, size) |
| #define | PJ_STRING_TO_NATIVE(s, buf, max) ((char*)s) |
| #define | PJ_DECL_ANSI_TEMP_BUF(buf, size) |
| #define | PJ_NATIVE_TO_STRING(cs, buf, max) ((char*)(const char*)cs) |
Functions |
| wchar_t * | pj_ansi_to_unicode (const char *str, pj_size_t len, wchar_t *wbuf, pj_size_t wbuf_count) |
| char * | pj_unicode_to_ansi (const wchar_t *wstr, pj_size_t len, char *buf, pj_size_t buf_size) |
Define Documentation
| #define PJ_DECL_ANSI_TEMP_BUF |
( |
buf, |
|
|
size |
|
) |
|
This macro is used to declare temporary ANSI buffer for Unicode to ANSI conversion, and should be put in declaration section of a block. When PJ_NATIVE_STRING_IS_UNICODE macro is not defined, this macro will expand to nothing.
| #define PJ_DECL_UNICODE_TEMP_BUF |
( |
var, |
|
|
size |
|
) |
|
This macro is used to declare temporary Unicode buffer for ANSI to Unicode conversion, and should be put in declaration section of a block. When PJ_NATIVE_STRING_IS_UNICODE macro is not defined, this macro will expand to nothing.
| #define PJ_NATIVE_TO_STRING |
( |
cs, |
|
|
buf, |
|
|
max |
|
) |
((char*)(const char*)cs) |
This macro will convert Unicode string to ANSI, when the platform's native string is Unicode (PJ_NATIVE_STRING_IS_UNICODE is non-zero).
| #define PJ_STRING_TO_NATIVE |
( |
s, |
|
|
buf, |
|
|
max |
|
) |
((char*)s) |
This macro will convert ANSI string to native, when the platform's native string is Unicode (PJ_NATIVE_STRING_IS_UNICODE is non-zero).
Function Documentation
| wchar_t* pj_ansi_to_unicode |
( |
const char * |
str, |
|
|
pj_size_t |
len, |
|
|
wchar_t * |
wbuf, |
|
|
pj_size_t |
wbuf_count | |
|
) |
| | |
Convert ANSI strings to Unicode strings.
- Parameters:
-
| str | The ANSI string to be converted. |
| len | The length of the input string. |
| wbuf | Buffer to hold the Unicode string output. |
| wbuf_count | Buffer size, in number of elements (not bytes). |
- Returns:
- The Unicode string, NULL terminated.
| char* pj_unicode_to_ansi |
( |
const wchar_t * |
wstr, |
|
|
pj_size_t |
len, |
|
|
char * |
buf, |
|
|
pj_size_t |
buf_size | |
|
) |
| | |
Convert Unicode string to ANSI string.
- Parameters:
-
| wstr | The Unicode string to be converted. |
| len | The length of the input string. |
| buf | Buffer to hold the ANSI string output. |
| buf_size | Size of the output buffer. |
- Returns:
- The ANSI string, NULL terminated.
PJLIB Open Source, high performance, small footprint, and very very portable framework
Copyright (C) 2006-2009 Teluu Inc.
|
|