Grant McLean
unread,Jan 6, 2020, 5:15:03 PM1/6/20You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to dbd...@perl.org
Hi
I've just noticed that the DBD::Pg documentation recommends removing any
mention of the 'pg_enable_utf8' connection attribute and instead relying
on the default behaviour which is based on the 'client_encoding'.
What's not clear to me is how I would ensure that 'client_encoding' gets
set correctly.
It looks like libpq will set the client_encoding based on the value of
LC_CTYPE or PGCLIENTENCODING. Is there some way to specify the client
encoding in the DBI->connect() call or should I just set the
PGCLIENTENCODING environment variable before connecting?
I want to use UTF8 as the client encoding, but for "reasons" (possibly
relating to legacy expectations around collation order) my clients will
have LC_CTYPE set to "POSIX".
Ultimately, I think a POD patch to DBD::Pg is probably required since
the docs currently say that client_encoding is important but don't say
how to set it.
Thanks
Grant