pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedSQL_ASCII and UNICODE server_encoding
3+ messages / 2 participants
[nested] [flat]
* SQL_ASCII and UNICODE server_encoding
@ 2004-08-16 13:56 Achilleus Mantzios <achill@matrix.gatewaynet.com>
0 siblings, 1 reply; 3+ messages in thread
From: Achilleus Mantzios @ 2004-08-16 13:56 UTC (permalink / raw)
To: pgsql-sql
Hi,
i'd like to ask if there is any difference in server_encoding
SQL_ASCII and UNICODE (there must be
one since the different terms), but
AFAIU
-databases which store in SQL_ASCII (i.e. server_encoding=SQL_ASCII)
have no problem storing 8bit chars with the first bit set.
-databases with server_encoding=UNICODE actually store in UTF-8 encoding
-The purpose of UTF-8 is to make possible that multibyte chars can
be stored in systems that represent chars in 8 bits
-So SQL_ASCII is fine for UTF-8, hence multibyte UNICODE.
So if SQL_ASCII should be fine for UTF-8 storage.
(here i must have missed something, tho..), whats
the purpose of server_encoding=UNICODE?
--
-Achilleus
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: SQL_ASCII and UNICODE server_encoding
@ 2004-08-16 14:42 Achilleus Mantzios <achill@matrix.gatewaynet.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 3+ messages in thread
From: Achilleus Mantzios @ 2004-08-16 14:42 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-sql
O kyrios Tom Lane egrapse stis Aug 16, 2004 :
> Achilleus Mantzios <achill@matrix.gatewaynet.com> writes:
> > So if SQL_ASCII should be fine for UTF-8 storage.
> > (here i must have missed something, tho..), whats
> > the purpose of server_encoding=UNICODE?
>
> If you use SQL_ASCII, the server will *store* Unicode just fine, but
> it won't *know* it is Unicode. So if you just want raw data storage
> it doesn't matter. If you would like to sort the data, upper-case
> or lower-case it, or have automatic conversions to different client
> encodings, you had better tell the server the truth about what it
> is storing.
Thanx, i guess i didnt realize the value of conversion,sorting,etc...
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
--
-Achilleus
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: SQL_ASCII and UNICODE server_encoding
@ 2004-08-16 15:04 Tom Lane <tgl@sss.pgh.pa.us>
parent: Achilleus Mantzios <achill@matrix.gatewaynet.com>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2004-08-16 15:04 UTC (permalink / raw)
To: Achilleus Mantzios <achill@matrix.gatewaynet.com>; +Cc: pgsql-sql
Achilleus Mantzios <achill@matrix.gatewaynet.com> writes:
> So if SQL_ASCII should be fine for UTF-8 storage.
> (here i must have missed something, tho..), whats
> the purpose of server_encoding=UNICODE?
If you use SQL_ASCII, the server will *store* Unicode just fine, but
it won't *know* it is Unicode. So if you just want raw data storage
it doesn't matter. If you would like to sort the data, upper-case
or lower-case it, or have automatic conversions to different client
encodings, you had better tell the server the truth about what it
is storing.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2004-08-16 15:04 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-08-16 13:56 SQL_ASCII and UNICODE server_encoding Achilleus Mantzios <achill@matrix.gatewaynet.com>
2004-08-16 15:04 ` Tom Lane <tgl@sss.pgh.pa.us>
2004-08-16 14:42 ` Achilleus Mantzios <achill@matrix.gatewaynet.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox