PostgreSQL database connection problem

Hi

I am getting the attached error when trying to connect to a newly installed postgreSQL server

The wiki instructions say [tt]# createdb -O mairlist -E UTF8 mairlist[/tt] - could this the problem?

Any pointers?

Cheers

Ron.


1252 eroor.jpg

What’s the exact PostgreSQL server version, and is it running on Windows or Linux?

From memory it is version 8.0 and running under linux.

Yep - it is 8.0 and linux. Any ideas?

mAirList requires (that is, has only been tested and approved for) at least version 8.3.

Torben

Ok on this and we are currently upgrading to 8.4 (along with associated updates) but, out of curiosity, why is the client using WIN1252 coding when the postgreSQL instructions say to use UTF8?

“WIN1252” refers to the client encoding, that is, the character set used by mAirList when sending and receiving data. The value is determined from the locale settings of your Windows installation.

The “UTF8” setting in the create instructions refers to the server encoding, i.e. the character set PostgreSQL uses internally to store the data. Generally, you can pick any character set supported by PostgreSQL, but I recommend that you use UTF8 because it’s more future-proof.

The only character set that won’t work for server encoding is “ASCII”, because you cannot save any special characters in “ASCII” databases (particularly important for non-English users). Unfortunately, many PostgreSQL installations use “ASCII” as the default value for newly created databases when you omit the “-E” parameter. This is why the mAirList manual suggest that you specify a particular encoding, namely “UTF8” which will work in any cases and for all languages.

The PostgreSQL server takes care of the conversion between the client encoding and the server encoding. According to the documentation, 8.0 does not yet support the “WIN1252” encoding, but 8.3 does:

8.0: http://www.postgresql.org/docs/8.0/static/multibyte.html
8.3: http://www.postgresql.org/docs/8.3/static/multibyte.html

So after you upgrade to version 8.3 or above, everything should be fine.

Cheers Torben.

v8.4 now installed and working so the way is clear for the next question (it is just a matter of time!)

Ron.