Home
last modified time | relevance | path

Searched refs:convmap (Results 1 – 7 of 7) sorted by relevance

/php-src/ext/mbstring/tests/
H A Dmb_encode_numericentity.phpt9 $convmap = array(0x0, 0x2FFFF, 0, 0xFFFF);
10 echo "1: " . mb_encode_numericentity($str1, $convmap, "UTF-8") . "\n";
14 $convmap = array(0xFF, 0x2FFFF, 0, 0xFFFF);
17 $convmap = [];
24 // Try doing weird things with convmap
25 $convmap = [
33 $convmap = [0, 10, 1000, 0xFFFF];
38 $convmap = [0, 10, -100000, 0xFFFFFF];
43 $convmap = [0, 1000, 0, 0x123];
48 $convmap = [0, 0xFFFF, 0, 0xFFFF];
[all …]
H A Dmb_decode_numericentity.phpt15 function test($desc, $str, $expected, $convmap, $encoding) {
16 $result = mb_decode_numericentity($str, $convmap, $encoding);
24 function testNonAscii($desc, $str, $expected, $convmap, $encoding) {
25 $result = mb_decode_numericentity($str, $convmap, $encoding);
37 // Typical convmap, typical numeric entity-encoded string
38 $convmap = array(0x0, 0x2FFFF, 0, 0xFFFF);
61 $convmap = [];
67 // Weird convmap
68 $convmap = [
75 $convmap = [0, 10, 1000, 0xFFFF];
[all …]
H A Dmb_decode_numericentity_errors.phpt8 $convmap = array(0xFF, 0x2FFFF, 0); // 3 elements
9 echo mb_decode_numericentity('str', $convmap, "UTF-8") . "\n";
14 $convmap = array(0xFF, "not an int", 0, 0); // 3 elements
15 echo mb_decode_numericentity('str', $convmap, "UTF-8") . "\n";
H A Dmb_encode_numericentity_errors.phpt8 $convmap = array(0xFF, 0x2FFFF, 0); // 3 elements
9 echo mb_encode_numericentity('str', $convmap, "UTF-8") . "\n";
14 $convmap = array(0xFF, "not an int", 0, 0); // 3 elements
15 echo mb_encode_numericentity('str', $convmap, "UTF-8") . "\n";
H A Dmb_decode_numericentity_large_ints.phpt17 function test($desc, $str, $expected, $convmap, $encoding) {
18 $result = mb_decode_numericentity($str, $convmap, $encoding);
26 function testNonAscii($desc, $str, $expected, $convmap, $encoding) {
27 $result = mb_decode_numericentity($str, $convmap, $encoding);
52 // Previously, signed arithmetic was used on convmap entries
53 test("Regression test (convmap entries are now treated as unsigned)", "&#7,", "?,", [0x22FFFF11, 0x…
62 Regression test (convmap entries are now treated as unsigned): string(4) "&#7," => string(2) "?," (…
H A Dmb_encode_numericentity_large_ints.phpt11 $convmap = [0xffffffff, 0xffffffff, 0x540a0af7, 0x5a485054];
12 echo "13: " . mb_encode_numericentity("\xFF", $convmap, "ASCII", true) . "\n";
/php-src/ext/mbstring/
H A Dmbstring.c3897 uint32_t *mapelm = convmap; in make_conversion_map()
3903 efree(convmap); in make_conversion_map()
3910 return convmap; in make_conversion_map()
3915 uint32_t *convmap_end = convmap + conversion_map_size; in html_numeric_entity_convert()
3917 for (uint32_t *mapelm = convmap; mapelm < convmap_end; mapelm += 4) { in html_numeric_entity_convert()
4023 if (convmap == NULL) { in PHP_FUNCTION()
4028 efree(convmap); in PHP_FUNCTION()
4034 uint32_t *convmap_end = convmap + conversion_map_size; in html_numeric_entity_deconvert()
4036 for (uint32_t *mapelm = convmap; mapelm < convmap_end; mapelm += 4) { in html_numeric_entity_deconvert()
4253 if (convmap == NULL) { in PHP_FUNCTION()
[all …]

Completed in 31 milliseconds