Re: What's a good default encoding? - Mailing list pgsql-general

From Tom Lane
Subject Re: What's a good default encoding?
Date
Msg-id 11853.1142478070@sss.pgh.pa.us
Whole thread Raw
In response to Re: What's a good default encoding?  ("Junaili Lie" <junaili@gmail.com>)
Responses Re: What's a good default encoding?
Re: What's a good default encoding?
List pgsql-general
"Junaili Lie" <junaili@gmail.com> writes:
> I am wondering if somebody here can tell me the difference between
> UTF-8 and SQL-ASCII, whether there are any benefits of converting
> SQL-ASCII to UTF-8?

SQL_ASCII isn't really an encoding; it's more like a declaration of
ignorance.  If the encoding is set to SQL_ASCII, the backend will store
any high-bit-on data you send it, and return it without any sort of
conversion.

If you are dealing with data beyond the 7-bit ASCII set, it's probably a
really bad idea to be using the SQL_ASCII setting, because the database
won't give you any help at all in checking for bad data or converting
between the encodings wanted by different client programs.  There are a
few situations where this is what you want, but I think most people are
better off picking a specific encoding.

            regards, tom lane

pgsql-general by date:

Previous
From: Noel Faux
Date:
Subject: Re: apparent loss of sys tables!! - help
Next
From: Mike Adams
Date:
Subject: Reprise of Oracle decode functionality...now with nifty plperlu (and two cupholders)