rapid7/metasploit-framework — pull request #119 by scriptjunkie (2012-01-21 03:10:42+00:00)
Title: Fix "failed to generate" error when passing a preferred encoder to "payload.generate" method using RPC from, for example, the GUI on Windows.

framework.encoders[reqs['Encoder']] returns nil when, for example, reqs['Encoder'] is in UTF-8 encoding and the corresponding key of the framework.encoders hash in US-ASCII encoding. (when the platform encoding doesn't match the msgpack encoding)

And yes, that's confusing. The encoding of the Encoder option doesn't match the encoding of the encoders hash keys. phew!