0

I am redirecting the stderr of pg_dump to file:

pg_dump ...... 2>pg_dump.log

but this file is ANSI-encoded. I would like to see it in UTF-8 or Unicode. Is this possible?

Paul
  • 25,812
  • 38
  • 124
  • 247

1 Answers1

1

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. 

BTW: regarding "UTF-8 or Unicode", the "or" does not make sense; UTF-8 is one of the encodings of Unicode (other is UTF-16)

Updated: Sorry, I misunderstood your problem. Are you interested in text error messages generated by Postresql or texts from some queries/data from your own data? If the former, I think the LC_MESSAGES setting should work http://www.postgresql.org/docs/9.2/interactive/locale.html Elsewhere, you can always use iconv

leonbloy
  • 73,180
  • 20
  • 142
  • 190
  • `Create the DUMP in the specified character set encoding.` I am not talking about dump. I am talking about STDERR messages, which encoding is different. – Paul Mar 20 '13 at 21:25