   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

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

  public static func scalar(buffer: UInt32, length: Int) -> UnicodeScalar {
    switch length {
    case 1:
      return UnicodeScalar(_unchecked: buffer & 0xff)
    case 2:
      var value = buffer       & 0b0______________________11_1111
      value    |= buffer &>> 2 & 0b0______________0111__1100_0000
