backported additional characters sql queries