Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix 'invalid multibyte escape' error #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix 'invalid multibyte escape' error #14

wants to merge 1 commit into from

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