| Línea 105... |
Línea 105... |
| 105 |
// control characters values are from 0 to 1F (hex values) in the ASCII table
|
105 |
// control characters values are from 0 to 1F (hex values) in the ASCII table
|
| 106 |
for ($charValue = 0x00; $charValue <= 0x1F; ++$charValue) {
|
106 |
for ($charValue = 0x00; $charValue <= 0x1F; ++$charValue) {
|
| 107 |
$character = \chr($charValue);
|
107 |
$character = \chr($charValue);
|
| 108 |
if (1 === preg_match("/{$this->escapableControlCharactersPattern}/", $character)) {
|
108 |
if (1 === preg_match("/{$this->escapableControlCharactersPattern}/", $character)) {
|
| 109 |
$charHexValue = dechex($charValue);
|
109 |
$charHexValue = dechex($charValue);
|
| 110 |
$escapedChar = '_x'.sprintf('%04s', strtoupper($charHexValue)).'_';
|
110 |
$escapedChar = '_x'.\sprintf('%04s', strtoupper($charHexValue)).'_';
|
| 111 |
$controlCharactersEscapingMap[$escapedChar] = $character;
|
111 |
$controlCharactersEscapingMap[$escapedChar] = $character;
|
| 112 |
}
|
112 |
}
|
| 113 |
}
|
113 |
}
|
| Línea 114... |
Línea 114... |
| 114 |
|
114 |
|