Support sqlScriptEncoding

Fixed the issue #1164