Smartys wrote:Convert the database content to UTF-8 and I think you're good to go ![smile](https://punbb.informer.com/forums/img/smilies/smile.png)
Cheers Smartys. Did the conversion, (only one db required conversion due to it having characters the UTF8 format wasn't happy with), and it all appears to be working fine now. ![smile](https://punbb.informer.com/forums/img/smilies/smile.png)
Thought I'd just pop some further info up on this too, incase it's ever useful in the future for someone else.
Firstly, don't make the stupid mistake I wasted two hours upon.
Mysql, if I remember correctly, just dumps a text version of the database when you do a dump. Pgsql, however, allows you to select several formats for the dump. Guess who didn't do a plaintext flatfile when he should have.
The command for pgsql, to do a db dump which will allow it to be converted is:
pg_dump [database_name] > [output_file]
If one uses the -Fc option to pg_dump, it won't be suitable for conversion. To reload the file after conversion, the command is:
psql -d [database_name] < [converted_file]
Running the command:
iconv -f ISO-8859-1 -t UTF-8 [output_file] > [converted_file]
will change the formatting of the characters, (in the above example from is0-8859-1), to utf8.
Also, the SET NAMES addition to the common_db.php file isn't required for Pgsql. It will already return the client_encoding type depending upon the database type, so it's appears to be a moot requirement with Pgsql. The command:
$db->query("SET NAMES 'UTF8'");
is an alias for, (to give it the true Pgsql syntax):
$db->query("SET 'client_encoding' TO 'UTF8'");
Finally, to create a utf8 db in Pgsql, (the default is SQL_ASCII), the command is:
createdb -E UTF8 -O [database_owner] [database_name]
Hope this is of some help. ![smile](https://punbb.informer.com/forums/img/smilies/smile.png)