moped
moped copied to clipboard
Encoding error with utf-8 database names
I don't think this is a relevant problem but since I'm using utf-8 everywhere (model names, attributes) without obstacles I didn't expected it. Hence, I'm reporting it.
Moped version is 1.5.2.
Given an utf-8 database name,
production:
sessions:
default:
database: producción
hosts:
- localhost
the following happens when trying to hit the database:
Encoding::CompatibilityError - incompatible character encodings: ASCII-8BIT and UTF-8:
../moped/protocol/message.rb:86:in `serialize_full_collection_name'
../moped/protocol/message.rb:286:in `serialize'
../moped/connection.rb:153:in `block in write'
../moped/connection.rb:151:in `each'
../moped/connection.rb:151:in `write'
../moped/node.rb:585:in `block (2 levels) in flush'
../moped/node.rb:150:in `ensure_connected'
../moped/node.rb:584:in `block in flush'
../moped/node.rb:599:in `logging'
../moped/node.rb:583:in `flush'
../moped/node.rb:572:in `process'
../moped/node.rb:372:in `query'
../moped/cursor.rb:138:in `block in load_docs'
../moped/session/context.rb:105:in `block in with_node'
../moped/cluster.rb:251:in `with_secondary'
../moped/session/context.rb:104:in `with_node'
../moped/cursor.rb:137:in `load_docs'
../moped/cursor.rb:25:in `each'
../moped/query.rb:76:in `each'
../moped/query.rb:76:in `each'