Davide Gonnella <davide.gonnella@gmail.com> writes:
> "warning: Could not determine encoding for locale "en_US-UTF-8" codeset is
> "646"
Are you sure that locale name is actually defined on your system?
"locale -a" will list the known names.
regards, tom lane