UDT CQL encoding does not work for unicode values
Using unicode as a value in a model with an UDT member will cause an exception.
Will raise the following (don't trust line numbers, some debug lines were added) :
linux / ubuntu LTS 14.04 / Python 2.7.6
+1 @ 5d03b8f
Turns out this was not solved by (but that change is merged on the same PR).
The issue: field names from UDT meta are unicode. The encoder genexpr was implicitly converting all values to unicode for formatting. The default codec is ascii, so it bails when trying to decode non-ascii text. This fix just avoids implicit decoding by encoding the names as utf-8.
Right now the encoder tries to use the 'native' string type of the runtime (byte string for py2, unicode for py3). I would prefer to make the driver use unicode internally for constructing query strings, but the changes are too wide-ranging to take that on right now.