一.查询当前操作系统字符集的命令
echo $LANG
env |grep LANG
locale | grep CTYPE
上面三种都可以查询当前系统所使用的字符集
二.查询ORACLE数据库字符集的SQL语句
1.server端字符集
select userenv('LANGUAGE') from dual;
2.dmp文件字符集
select nls_charset_name(to_number('0354','xxxx')) from dual;
三.查询PostgreSQL数据库字符集的SQL语句
1.服务器端字符集
show server_encoding;
2.客户端字符集
show client_encoding;