Description
When processing CQL string literals, we ultimately use String.getBytes(Charset), which has the following note:
This method always replaces malformed-input and unmappable-character sequences with this charset's default replacement byte array. The CharsetEncoder class should be used when more control over the encoding process is required.
So, if we insert a non-ASCII character into an ascii string literal, it will be replaced with a ? char. Something similar happens for UTF-8.
For example:
cqlsh:ks1> create table badstrings (a int primary key, b ascii); cqlsh:ks1> insert into badstrings (a, b) VALUES ( 0, 'ΎΔδϠ'); cqlsh:ks1> select * from badstrings; a | b ---+------ 0 | ????