Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-947

Querying collections with unicode names throws error

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.1.0
    • Affects Version/s: 2.0.4
    • Component/s: Wire Protocol
    • None
    • Environment:
      Ubuntu 14.04, Ruby 2.1.6

      This seems to be an encoding issue, when the driver attempts to serialize to BSON it gets an encoding mismatch. Here's a chunk of stack trace:

      Encoding::CompatibilityError: incompatible character encodings: ASCII-8BIT and UTF-8
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/protocol/serializers.rb:77:in `serialize'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/protocol/message.rb:155:in `block in serialize_fields'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/protocol/message.rb:141:in `each'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/protocol/message.rb:141:in `serialize_fields'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/protocol/message.rb:70:in `serialize'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/server/connection.rb:123:in `block in write'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/server/connection.rb:122:in `each'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/server/connection.rb:122:in `write'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/server/connectable.rb:66:in `block in dispatch'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/loggable.rb:44:in `log'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/loggable.rb:65:in `log_debug'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/server/connectable.rb:65:in `dispatch'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/operation/read/query.rb:61:in `block in execute_message'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/server/connection_pool.rb:99:in `with_connection'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/server/context.rb:63:in `with_connection'
      from /app/vendor/bundle/ruby/2.1.0/gems/mongo-2.0.4/lib/mongo/operation/read/query.rb:60:in `execute_message'

            Assignee:
            emily.stolfo Emily Stolfo
            Reporter:
            kurt@mongohq.com Kurt
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: