charset SQL sequence fix. closes #1524