   public static func scalar(buffer: UInt32, length: Int) -> UnicodeScalar {
     switch length {
     case 1:
-      return UnicodeScalar(_unchecked: buffer & 0x7f)
+      return UnicodeScalar(_unchecked: buffer & 0xff)
     case 2:
       var value = (buffer & 0b0_______________________11_1111__0000_0000) &>> 8
       value    |= (buffer & 0b0________________________________0001_1111) &<< 6

  
  public // @testable
  func _validateBuffer() -> (valid: Bool, length: UInt8) {
    if _buffer & 0x80 == 0 { // 1-byte sequence (ASCII), buffer: [ ... ... ... CU0 ].
      return (true, 1)
    }

      let codeUnit = _buffer & 0xff
      _buffer &>>= 8
      _bitsInBuffer = _bitsInBuffer &- 8
      return .valid(codeUnit, length: 1)
    }
    // Buffering mode.
    // Fill buffer back to 4 bytes (or as many as are left in the iterator).
