Lines Matching refs:fromEncoding
90 function testConversion($fromString, $toString, $fromEncoding, $toEncoding) {
91 $result = mb_convert_encoding($fromString, $toEncoding, $fromEncoding);
93 …echo "mb_convert_encoding not working on $fromEncoding input: " . dbgPrint($fromString) . "\nExpec…
98 function testValidConversion($fromString, $toString, $fromEncoding, $toEncoding) {
100 testConversion($fromString, $toString, $fromEncoding, $toEncoding);
102 …echo "mb_convert_encoding incremented illegal_chars on valid $fromEncoding string: " . dbgPrint($f…
107 function convertValidString($fromString, $toString, $fromEncoding, $toEncoding, $bothWays = true) {
108 testValidConversion($fromString, $toString, $fromEncoding, $toEncoding);
110 testValidConversion($toString, $fromString, $toEncoding, $fromEncoding);
113 function convertInvalidString($fromString, $toString, $fromEncoding, $toEncoding) {
115 testConversion($fromString, $toString, $fromEncoding, $toEncoding);
117 …echo "mb_convert_encoding did not increment illegal_chars on invalid $fromEncoding string: " . dbg…
122 function testValidString($fromString, $toString, $fromEncoding, $toEncoding, $bothWays = true) {
123 identifyValidString($fromString, $fromEncoding);
124 convertValidString($fromString, $toString, $fromEncoding, $toEncoding, $bothWays);
127 function testInvalidString($fromString, $toString, $fromEncoding, $toEncoding) {
128 identifyInvalidString($fromString, $fromEncoding);
129 convertInvalidString($fromString, $toString, $fromEncoding, $toEncoding);
134 function testAllValidChars($charMap, $fromEncoding, $toEncoding, $bothWays = true) {
143 testValidString($fromString, $toString, $fromEncoding, $toEncoding, $bothWays);
154 testValidString($fromString, $toString, $fromEncoding, $toEncoding, $bothWays);
156 $strLen = mb_strlen($fromString, $fromEncoding);
158 …echo "Length of $fromEncoding string '" . bin2hex($fromString) . "' was different than expected; m…
164 function testAllInvalidChars($badChars, $charMap, $fromEncoding, $toEncoding, $replacement) {
176 testInvalidString($fromString, $toString, $fromEncoding, $toEncoding);
180 function convertAllInvalidChars($badChars, $charMap, $fromEncoding, $toEncoding, $replacement) {
192 convertInvalidString($fromString, $toString, $fromEncoding, $toEncoding);
196 function testTruncatedChars($truncated, $fromEncoding, $toEncoding, $replacement) {
199 testInvalidString($truncatedChar, $replacement, $fromEncoding, $toEncoding);