Bugfix in SQL script generation
SQL: fix encoding problem