| From: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> | 
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
| Cc: | Hackers <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | Re: ISO-8859-1 encoding not enforced? | 
| Date: | 2005-04-13 02:10:32 | 
| Message-ID: | 425C7F98.8010406@familyhealth.com.au | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2005-04-13 02:10:43 | Re: Assigning fixed OIDs to system catalogs and indexes | 
| Previous Message | Qingqing Zhou | 2005-04-13 02:09:57 | Re: Assigning fixed OIDs to system catalogs and indexes |