plperl: Skip setting UTF8 flag when in SQL_ASCII encoding

Alvaro Herrera <alvherre@alvh.no-ip.org>

Commit: fc661f78c6007103604fc43e98622a71400b769f
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2012-07-10T19:50:58Z
Releases: 9.1.5
plperl: Skip setting UTF8 flag when in SQL_ASCII encoding

When in SQL_ASCII encoding, strings passed around are not necessarily
UTF8-safe.  We had already fixed this in some places, but it looks like
we missed some.

I had to backpatch Peter Eisentraut's a8b92b60 to 9.1 in order for this
patch to cherry-pick more cleanly.

Patch from Alex Hunsaker, tweaked by Kyotaro HORIGUCHI and myself.

Some desultory cleanup and comment addition by me, during patch review.

Per bug report from Christoph Berg in
20120209102116.GA14429@msgid.df7cb.de

Files

PathChange+/−
src/pl/plperl/expected/plperl.out modified +0 −10
src/pl/plperl/GNUmakefile modified +1 −1
src/pl/plperl/plperl_helpers.h modified +51 −19
src/pl/plperl/sql/plperl.sql modified +0 −9
src/pl/plperl/Util.xs modified +19 −8