UTF8 with BOM support in psql - Mailing list pgsql-hackers

From Itagaki Takahiro
Subject UTF8 with BOM support in psql
Date
Msg-id 20091020143811.379B.52131E4D@oss.ntt.co.jp
Whole thread Raw
Responses Re: UTF8 with BOM support in psql
Re: UTF8 with BOM support in psql
List pgsql-hackers
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.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Application name patch - v2
Next
From: Bruce Momjian
Date:
Subject: Re: Controlling changes in plpgsql variable resolution