Re: Questions about pg_enable_utf8

"Greg Sabino Mullane" <greg-738XdyZ4GzZWk0Htik3J/[email protected]>
Newsgroups gmane.comp.db.postgresql.dbdpg
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160


> From my *limited* knowledge of DBD::Pg it seems the pg_enable_utf8
> option simply forces the utf8 flag on data read from the database
> *IF* that data looks like a valid utf8 string.  Does that happen on
> all column data, or only columns that are text?

All text-like columns: CHAR, TEXT, BPCHAR, VARCHAR

> Are there any other actions by DBD::Pg for supporting character
> encodings?

Not really.

> I think the "proper" approach would be to decode using the
> client_encoding on read from the db on text columns and likewise
> encode to the client encoding on write back to the db.  But, perhaps
> there is a reason that approach was not taken.

I don't honestly remember why things are like they are at the moment,
but we certainly may be doing the things the wrong way. :) Maybe you can
expand the above paragraph into a more formal set of proposed rules.
When I get some time, I'll devote some cycles to this.

- --
Greg Sabino Mullane greg-738XdyZ4GzZWk0Htik3J/[email protected]
End Point Corporation
PGP Key: 0x14964AC8 200809081724
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAkjFmCsACgkQvJuQZxSWSsiOaQCguCgxEMWz59d1ZicV783Or/Cd
rzAAn2tyqneigbchq2tdIow5/e2ZlJJ7
=5gYk
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.