fix UTF8 string truncation in SELECT statements