SQL ASCII encoding

Started by frank churchabout 20 years ago4 messagesgeneral
Jump to latest
#1frank church
pgsql@adontendev.net

My databases are created in SQL ASCII by default.

Is there some disadvantage to this? As a British user, which is the preferred
character set and what advantage do I have to gain by using it?database

#2Martijn van Oosterhout
kleptog@svana.org
In reply to: frank church (#1)
Re: SQL ASCII encoding

On Wed, Apr 05, 2006 at 01:35:00PM +0000, Frank Church wrote:

My databases are created in SQL ASCII by default.

Is there some disadvantage to this? As a British user, which is the preferred
character set and what advantage do I have to gain by using it?database

SQL ASCII just means that the database will not do anything encoding
related for you. It won't check it nor will it convert anything.

The downside is that your apps could be uploading UTF-8, Latin-1,
Latin-9, anything and there will be no way to tell the difference. Also
things like upper(), lower() and case-comparison won't work on anything
other than ASCII characters.

If you setup your database to be UNICODE/UTF-8 then postgres can check
that the stuff you send is properly encoded. In your clients you should
do something like "set client_encoding=latin9" to ensure everything
gets converted up.

As a british user, latin9 will cover most of your needs, unless
ofcourse someone wants to enter their name in chinese :)

Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/

Show quoted text

Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
tool for doing 5% of the work and then sitting around waiting for someone
else to do the other 95% so you can sue them.

#3Harald Fuchs
hf0923x@protecting.net
In reply to: frank church (#1)
Re: SQL ASCII encoding

In article <20060405135419.GD18401@svana.org>,
Martijn van Oosterhout <kleptog@svana.org> writes:

As a british user, latin9 will cover most of your needs, unless
ofcourse someone wants to enter their name in chinese :)

Since british users don't use French OE ligatures or Euro currency
signs, even latin1 would do.

#4Richard Jones
rich@annexia.org
In reply to: Harald Fuchs (#3)
Re: SQL ASCII encoding

On Wed, Apr 05, 2006 at 10:15:18PM +0200, Harald Fuchs wrote:

In article <20060405135419.GD18401@svana.org>,
Martijn van Oosterhout <kleptog@svana.org> writes:

As a british user, latin9 will cover most of your needs, unless
ofcourse someone wants to enter their name in chinese :)

Since british users don't use French OE ligatures or Euro currency
signs, even latin1 would do.

However as a British PostgreSQL user, I would really like to encourage
the O.P. to use UNICODE for _every_ database.

My question: Is it possible to upgrade a database from ASCII to
UNICODE without dumping and restoring?

Rich.

--
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Team Notepad - intranets and extranets for business - http://team-notepad.com