gearman-ruby icon indicating copy to clipboard operation
gearman-ruby copied to clipboard

UTF-8 encoded string in Task throwing exception

Open roback opened this issue 11 years ago • 2 comments

If the arg string given to Task.new is encoded as UTF-8 and contains chars such as åäö, an Encoding::CompatibilityError Incompatible character encodings: UTF-8 and ASCII-8BIT is thrown on line 217.

Calling .force_encoding(Encoding::ASCII_8BIT) on the arg string before calling Task.new("test", arg) fixes the problem.

roback avatar Feb 18 '14 15:02 roback

+1

tamoyal avatar Jan 08 '15 03:01 tamoyal

I'll write some specs to test this and then fix it.

johnewart avatar Jan 13 '15 04:01 johnewart