Re: ISO-8859-1 encoding not enforced? - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: ISO-8859-1 encoding not enforced?
Date
Msg-id 425C7F98.8010406@familyhealth.com.au
Whole thread Raw
In response to Re: ISO-8859-1 encoding not enforced?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: ISO-8859-1 encoding not enforced?
List pgsql-hackers
>>Is PostgreSQL supposed to enforce a LATIN1/ISO-8859-1 encoding if that's 
>>the database encoding?
> 
> AFAIK, there are no illegal characters in 8859-1, except \0 which we
> do reject.

Hmmm...

It turns out I was confused by the developer who reported this issue. 
Basically they have a requirement that they only want the parts of 
LATIN1 that can be converted to single byte UTF8 (ie. 7bit ascii).

Only about 8 of these high bit characters existed in our database, so I 
replaced them and put in a CHECK constraint on a few fields like this:
 CHECK (description = convert(description, 'ISO-8859-1', 'UTF-8'))

Can I put in a request for a '7 bit ascii' encoding for PostgreSQL :)

Chris


pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: Assigning fixed OIDs to system catalogs and indexes
Next
From: Alvaro Herrera
Date:
Subject: Re: Assigning fixed OIDs to system catalogs and indexes