On Wed, Oct 6, 2010 at 12:44 AM, John Mettraux <[email protected]> wrote:
> con.put("宮島")
> ...
> /Users/jmettraux/.rvm/gems/ruby-1.9.1-p378/gems/beanstalk-client-1.1.0/lib/beanstalk-client/connection.rb:203:in
>  `check_resp': EXPECTED_CRLF (Beanstalk::ExpectedCRLFError)

I haven't tried ruby 1.9 yet, but I expect this is a change in the
meaning of `"宮島".size`. In ruby 1.8 that method returns the number of
bytes in the string, but 1.9 (I guess) returns the number of unicode
codepoints, which can be fewer than the number of bytes.

I should be using method `bytesize` there instead of `size`.

> Should Base64 my payload as a workaround?

That would work. You should be fine as long as your payload contains
only 1-byte unicode codepoints (essentially ASCII).

kr

-- 
You received this message because you are subscribed to the Google Groups 
"beanstalk-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/beanstalk-talk?hl=en.

Reply via email to