     else { expectNotEqual(0, errorCount) }
   }
   check(expected.reversed(), "reverse, repairing: true")
-  return result
-}
-
-func checkDecodeUTF8(
-    _ expectedHead: [UInt32],
-    _ expectedRepairedTail: [UInt32], _ utf8Str: [UInt8]
-) -> AssertionResult {
-  var expected: [UnicodeScalar] = []
-  do {
-    var i = utf8Str.makeIterator()
-    UTF8.ForwardDecoder.decode(&i, repairingIllFormedSequences: true) {
-      expected.append($0)
-    }
-  }
-  
-  let scalars = Unicode.DefaultScalarView(utf8Str, fromEncoding: UTF8.self)
-  expectEqualSequence(expected, scalars)
-  expectEqualSequence(expected.reversed(), scalars.reversed())
-  
+
+  let scalars = Unicode.DefaultScalarView(utfStr, fromEncoding: Codec.self)
+  expectEqualSequence(expected, scalars.map { $0.value })
+  expectEqualSequence(
+    expected.reversed(),
+    scalars.reversed().map { $0.value })
+
   do {
     var x = scalars.makeIterator()
     var j = scalars.startIndex

      }
      // Non-ASCII, proceed to buffering mode.
      buffer.append(codeUnit)
    } else if buffer._storage & 0x80 == 0 {
      // ASCII in buffer.  We don't refill the buffer so we can return
      // to bufferless mode once we've exhausted it.
      let codeUnit = CodeUnit(extendingOrTruncating: buffer._storage)

      utf16Str)
}

/*
func checkDecodeUTF32(
    _ expectedHead: [UInt32],
    _ expectedRepairedTail: [UInt32], _ utf32Str: [UInt32]
