| From: | Bruce Momjian <bruce(at)momjian(dot)us> | 
|---|---|
| To: | Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> | 
| Cc: | pgsql-hackers(at)postgresql(dot)org | 
| Subject: | Re: UTF8 with BOM support in psql | 
| Date: | 2009-10-20 05:58:58 | 
| Message-ID: | 200910200558.n9K5wwM11713@momjian.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
Itagaki Takahiro wrote:
> UTF8 encoding text files with BOM (Byte Order Mark) are commonly
> used in Windows, though BOM was designed for UTF16 text originally.
> However, psql cannot read such format even if we set client encoding
> to UTF8. Is it worth supporting those format in psql?
> 
> When psql opens a file with -f or \i, it checks first 3 bytes of the
> file. If they are BOM, discard the 3 bytes and change client encoding
> to UTF8 automatically.
> 
> Is this change reasonable? Comments welcome.
Seems there is community support for accepting BOM:
http://archives.postgresql.org/pgsql-hackers/2009-09/msg01625.php
Should I add this as a TODO item?
-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Itagaki Takahiro | 2009-10-20 06:18:49 | Re: UTF8 with BOM support in psql | 
| Previous Message | Peter Eisentraut | 2009-10-20 05:43:20 | Re: Could postgres be much cleaner if a future release skipped backward compatibility? |