Skip to content

Conversation

@martin-straub
Copy link

Working with Ruby 2.1.5

  • # -*- encoding : binary -*- fixed my 'invalid multibyte escape' error, like it did in Fix invalid multi-byte escape errors on ruby 1.9.
  • But then I ran into another Encoding::CompatibilityError: incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string) fixed with value.force_encoding "BINARY" and value.force_encoding("utf-8").
  • I admit I just pattern matched and don't understand what's going on in detail.
  • I guess the following method has to be treated equally (but my code doesn't touch it):
  def Vpim.encode_paramtext(value)
    case value
    when %r{\A#{Bnf::SAFECHAR}*\z}
      value
    else
      raise Vpim::Unencodeable, "paramtext #{value.inspect}"
    end
  end
  • And perhaps other Vpim.decode_X methods containing %r{…}, too.
  • I'm still trying to get the vpim tests running…

This fixed my 'invalid multibyte escape' error, like it did in 890549b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant