Avoid incompatible encoding regexp match in protocol.rb