Code Duplication    Length = 7-7 lines in 2 locations

ufpdf/ufpdf.php 2 locations

@@ 322-328 (lines=7) @@
319
        case 2:
320
          $cp = (($q[0] ^ 0xC0) << 6) | ($q[1] ^ 0x80);
321
          // Overlong sequence
322
          if ($cp < 0x80) {
323
            $out .= "\xFF\xFD";
324
          }
325
          else {
326
            $out .= chr($cp >> 8);
327
            $out .= chr($cp & 0xFF);
328
          }
329
          continue;
330
331
        case 3:
@@ 338-344 (lines=7) @@
335
            $out .= "\xFF\xFD";
336
          }
337
          // Check for UTF-8 encoded surrogates (caused by a bad UTF-8 encoder)
338
          else if ($c > 0xD800 && $c < 0xDFFF) {
339
            $out .= "\xFF\xFD";
340
          }
341
          else {
342
            $out .= chr($cp >> 8);
343
            $out .= chr($cp & 0xFF);
344
          }
345
          continue;
346
347
        case 4: