in most debian-based distros (For example in ubuntu, and debian itself), you can simply use the following command to create (and afterwards run) a PostgreSQL database cluster with a an encoding other than default.
LC_ALL=C /usr/lib/postgresql/8.4/bin/initdb -E EUC_JP -D $(pwd)
After this, you will se a message telling you to start the database and stuff… and that’s it. You just have to be carefull when starting the database, since the command configures everthing to be working with the port 5432 which is postgresql’s default port. Also, you may have to set the permissons.
This also gives another advantage, have multiple databases with different encodings, as the regional configuration of the cluster is set to C. This link to the PostgreSQL’s official docs, explains why you have to do this kind of magic to be able to have something like this. Just an advice: