version 1.1, 2012/02/21 23:50:25
|
version 1.1.1.2, 2013/07/22 08:25:56
|
Line 64 Arguments:
|
Line 64 Arguments:
|
Returns: number of characters placed in the buffer |
Returns: number of characters placed in the buffer |
*/ |
*/ |
|
|
int | unsigned int |
PRIV(ord2utf)(pcre_uint32 cvalue, pcre_uchar *buffer) |
PRIV(ord2utf)(pcre_uint32 cvalue, pcre_uchar *buffer) |
{ |
{ |
#ifdef SUPPORT_UTF |
#ifdef SUPPORT_UTF |
|
|
/* Checking invalid cvalue character, encoded as invalid UTF-16 character. |
|
Should never happen in practice. */ |
|
if ((cvalue & 0xf800) == 0xd800 || cvalue >= 0x110000) |
|
cvalue = 0xfffe; |
|
|
|
if (cvalue <= 0xffff) |
if (cvalue <= 0xffff) |
{ |
{ |