本人在执行使用GBase8s数据库执行sql脚本时,添加中文注释时报错 -34389 Illegal character has been found in the input string
查看了GBase社区的处理方法,并没有解决问题。
既然是SQL中存在非法字符,那么也有可能是数据库和sql脚本的字符集不匹配导致的。
查看字符集确实不匹配,需要修改sql脚本的字符集。
iconv t.sql -f utf-8 -t GB18030 -o t_gb18.sql[gbasedbt@shipeiarm-0005 ~]$ file t_gb18.sql
t_gb18.sql: ISO-8859 text
再次执行sql脚本,执行成功。