I tried to execute the following insert statement with the latest version of the cassandra-cql gem:
UPDATE Event_Filter SET 'utøya' = '{"type":"track","enabled":true,"createDate":1376284277135,"modifiedDate":1376284277135}', 'utoya' = '{"type":"track","enabled":true,"createDate":1376284277135,"modifiedDate":1376284277135}' WHERE KEY = 'Utøya';
and it dies with this exception (generated by thrift):
.../gems/thrift-0.8.0/lib/thrift/transport/framed_transport.rb:84:in write': incompatible character encodings: ASCII-8BIT and UTF-8 (Encoding::CompatibilityError) from .../gems/thrift_client-0.8.4/lib/thrift_client/server.rb:90:inwrite'
from .../gems/thrift-0.8.0/lib/thrift/protocol/binary_protocol.rb:112:in write_string' from .../gems/thrift-0.8.0/lib/thrift/client.rb:35:inwrite'
from .../gems/thrift-0.8.0/lib/thrift/client.rb:35:in send_message' from .../gems/cassandra-cql-1.2.1/vendor/1.1/gen-rb/cassandra.rb:542:insend_execute_cql_query'
from .../gems/cassandra-cql-1.2.1/vendor/1.1/gen-rb/cassandra.rb:537:in execute_cql_query' from .../gems/thrift_client-0.8.4/lib/thrift_client/abstract_thrift_client.rb:165:inblock in handled_proxy'
from .../gems/thrift_client-0.8.4/lib/thrift_client/abstract_thrift_client.rb:146:in ensure_socket_alignment' from .../gems/thrift_client-0.8.4/lib/thrift_client/abstract_thrift_client.rb:165:inhandled_proxy'
from .../gems/thrift_client-0.8.4/lib/thrift_client/abstract_thrift_client.rb:53:in execute_cql_query' from .../gems/cassandra-cql-1.2.1/lib/cassandra-cql/database.rb:112:inexecute_cql_query'
from .../gems/cassandra-cql-1.2.1/lib/cassandra-cql/statement.rb:47:in execute' from .../gems/cassandra-cql-1.2.1/lib/cassandra-cql/database.rb:98:inexecute'
from add_utøya.rb:17:in add_event' from add_utøya.rb:28:inmain'
from add_utøya.rb:32:in `'
Any suggestions on how to get this to work? It's amazing to me that thrift doesn't support UTF-8 encoding! Note: The cassandra gem fails on this as well, for the same reason.
I'm wondering if this has been fixed in thrift-0.9? Is there anyway to tell the cassandra-cql gem to make use of the thrift-0.9 library?
Hi,
I tried to execute the following insert statement with the latest version of the cassandra-cql gem:
UPDATE Event_Filter SET 'utøya' = '{"type":"track","enabled":true,"createDate":1376284277135,"modifiedDate":1376284277135}', 'utoya' = '{"type":"track","enabled":true,"createDate":1376284277135,"modifiedDate":1376284277135}' WHERE KEY = 'Utøya';
and it dies with this exception (generated by thrift):
.../gems/thrift-0.8.0/lib/thrift/transport/framed_transport.rb:84:in'
write': incompatible character encodings: ASCII-8BIT and UTF-8 (Encoding::CompatibilityError) from .../gems/thrift_client-0.8.4/lib/thrift_client/server.rb:90:in
write' from .../gems/thrift-0.8.0/lib/thrift/protocol/binary_protocol.rb:112:inwrite_string' from .../gems/thrift-0.8.0/lib/thrift/client.rb:35:in
write' from .../gems/thrift-0.8.0/lib/thrift/client.rb:35:insend_message' from .../gems/cassandra-cql-1.2.1/vendor/1.1/gen-rb/cassandra.rb:542:in
send_execute_cql_query' from .../gems/cassandra-cql-1.2.1/vendor/1.1/gen-rb/cassandra.rb:537:inexecute_cql_query' from .../gems/thrift_client-0.8.4/lib/thrift_client/abstract_thrift_client.rb:165:in
block in handled_proxy' from .../gems/thrift_client-0.8.4/lib/thrift_client/abstract_thrift_client.rb:146:inensure_socket_alignment' from .../gems/thrift_client-0.8.4/lib/thrift_client/abstract_thrift_client.rb:165:in
handled_proxy' from .../gems/thrift_client-0.8.4/lib/thrift_client/abstract_thrift_client.rb:53:inexecute_cql_query' from .../gems/cassandra-cql-1.2.1/lib/cassandra-cql/database.rb:112:in
execute_cql_query' from .../gems/cassandra-cql-1.2.1/lib/cassandra-cql/statement.rb:47:inexecute' from .../gems/cassandra-cql-1.2.1/lib/cassandra-cql/database.rb:98:in
execute' from add_utøya.rb:17:inadd_event' from add_utøya.rb:28:in
main' from add_utøya.rb:32:in `Any suggestions on how to get this to work? It's amazing to me that thrift doesn't support UTF-8 encoding! Note: The cassandra gem fails on this as well, for the same reason.
I'm wondering if this has been fixed in thrift-0.9? Is there anyway to tell the cassandra-cql gem to make use of the thrift-0.9 library?