We installed the script on various fresh installs of Ubuntu 12.04.4, where postgres initializes itself to unicode, but maybe you have a nationalized version of ubuntu that causes this effect, or you are running the script from a shell where the environment variables cause this effect. To be on the safe side, i've added setting of environment variables to the script.
glad, everything works fine now.