To answer my question:
has name_encoded to be at least TEXT to fully store an URL-encoded (in PHP rawurlencode) UTF8 string?
for sure, an URL encoded UTF8 string can be up to 3060 characters long, so TEXT
is required
does it matter which collation I use for name_encoded (I think not, because URL-encoded they should fit into latin)
URL encoded string fits into ASCII
which data type and collation should I use for name to store at least 255 characters with full UTF8 support and to create an UNIQUE KEY nevertheless
this is not possible, because of length restriction for text columns in UNIQUE KEY
s
I'm checking for duplicates by executing a SELECT
first, so there is no need for an UNIQUE KEY
, but application has to ensure data integrity