我正在将pg_dump的标准错误重定向到文件:
pg_dump ...... 2>pg_dump.log但是这个文件是ANSI编码的。我希望看到它的UTF-8或Unicode。这个是可能的吗?
发布于 2013-03-19 10:21:44
man pg_dump
-E encoding
--encoding=encoding
Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. 顺便说一下:对于"UTF-8或Unicode"," or“没有意义;UTF-8是Unicode的一种编码(另一种是UTF-16)
更新:对不起,我误解了你的问题。您对Postresql生成的文本错误消息或来自您自己数据的一些查询/数据的文本感兴趣吗?如果是前者,我认为LC_MESSAGES设置应该适用于其他地方的http://www.postgresql.org/docs/9.2/interactive/locale.html,您可以始终使用iconv
https://stackoverflow.com/questions/15482071
复制相似问题