Skip to content

Research flaky UTF-8 vs. ASCII problem

Under unknown circumstances, this error happens:

1) user sends a plain text message from thunderbird being signed-inline
     Failure/Error: expect(error).to be_empty
       expected `"Error: A serious, unhandleable error happened. Please contact the administrators of this system or service and provide them with the following information:\n\ninvalid byte sequence in US-ASCII\n".empty?` to return true, got false
     # ./spec/schleuder/integration/send_plain_spec.rb:18:in `block (3 levels) in <top (required)>'
     # ./spec/spec_helper.rb:47:in `block (3 levels) in <top (required)>'
     # ./spec/spec_helper.rb:46:in `block (2 levels) in <top (required)>'

So far we have seen it in the CI at 0xacab.org and debian.org, not locally.

The messages in question appear to be:

  • spec/fixtures/mails/signed-mime/thunderbird.eml
  • spec/fixtures/mails/signed-inline/thunderbird.eml

Actually ruby reports (on my machine) for the relevant mime-part of those messages a charset of utf-8, but a string encoding of #<Encoding:ASCII-8BIT>. Maybe one could find the problem if digging deeper here. (Maybe it's even a thunderbird issue, not actually ours?)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information