There's more...

In PostgreSQL, the default server encoding is already UTF-8, but if you want to explicitly create a PostgreSQL database with UTF-8 encoding, then you can do that with the following command:

$ createdb --encoding=UTF8 --locale=en_US.UTF-8 --template=template0 myproject