【1】clickhouse及gbase中文字段导出可能出现换行或者乱码等情况
导出时可以使用正则表达式替换特殊字符
clickhouse: replace(replace(replaceRegexpAll(substring(coalesce(XXXX,''),1,2),'"|\'|\\|/| |\|',''),char(10),''),char(13),'') gbase: replace(replace(regexp_replace(substring(coalesce(XXXX,''),1,2),'"|\'|\\|/| |\|',''),char(10),''),char(13),'')
【2】gbase导出数据到文件时,默认可能会是ANSI格式,中文导入其他utf8字符集数据库时会乱码,需要设置导出utf8格式文件
rmt:select * from tablename into outfile 'xxx.unl' character set utf8 fields terminated by '|';
翻译
搜索
复制
标签:utf8,导出,replace,char,gbase,clickhouse From: https://www.cnblogs.com/qsds/p/17751937.html