mirror of
https://github.com/php/php-src.git
synced 2024-11-28 12:26:37 +08:00
- MFH: add support for entities in hexadecimal format, like © can
be passed as © or © (sync with gd)
This commit is contained in:
parent
b7f2d8f17e
commit
75e9e12093
2
NEWS
2
NEWS
@ -1,6 +1,8 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? Sep 2006, PHP 5.2.0
|
||||
- Added support for hexadecimal entity in imagettftext() for the bundled GD.
|
||||
(Pierre)
|
||||
- Fixed bug #38543 (shutdown_executor() may segfault when memory_limit is too
|
||||
low). (Dmitry)
|
||||
- Fixed bug #38535 (memory corruption in pdo_pgsql driver on error retrieval
|
||||
|
@ -207,12 +207,28 @@ static int gdTcl_UtfToUniChar (char *str, Tcl_UniChar * chPtr)
|
||||
|
||||
byte = *((unsigned char *) (str + 1));
|
||||
if (byte == '#') {
|
||||
for (i = 2; i < 8; i++) {
|
||||
byte = *((unsigned char *) (str + i));
|
||||
if (byte >= '0' && byte <= '9') {
|
||||
n = (n * 10) + (byte - '0');
|
||||
} else {
|
||||
break;
|
||||
byte = *((unsigned char *) (str + 2));
|
||||
if (byte == 'x' || byte == 'X') {
|
||||
for (i = 3; i < 8; i++) {
|
||||
byte = *((unsigned char *) (str + i));
|
||||
if (byte >= 'A' && byte <= 'F')
|
||||
byte = byte - 'A' + 10;
|
||||
else if (byte >= 'a' && byte <= 'f')
|
||||
byte = byte - 'a' + 10;
|
||||
else if (byte >= '0' && byte <= '9')
|
||||
byte = byte - '0';
|
||||
else
|
||||
break;
|
||||
n = (n * 16) + byte;
|
||||
}
|
||||
} else {
|
||||
for (i = 2; i < 8; i++) {
|
||||
byte = *((unsigned char *) (str + i));
|
||||
if (byte >= '0' && byte <= '9') {
|
||||
n = (n * 10) + (byte - '0');
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (byte == ';') {
|
||||
|
Loading…
Reference in New Issue
Block a user