Fix bugs in sqlchar_to_unicode and unicode_to_sqlchar: both were measuring the length of a UTF8 character with pg_mblen (wrong if DB encoding isn't UTF8), and the latter was blithely assuming that a static buffer would somehow revert to all zeroes for each use.
Fix bugs in sqlchar_to_unicode and unicode_to_sqlchar: both were measuring
the length of a UTF8 character with pg_mblen (wrong if DB encoding isn't
UTF8), and the latter was blithely assuming that a static buffer would somehow
revert to all zeroes for each use.

0x0FFF/gpdb,royc1/gpdb,greenplum-db/gpdb,CraigHarris/gpdb,chrishajas/gpdb,jmcatamney/gpdb,kaknikhil/gpdb,adam8157/gpdb,edespino/gpdb,ashwinstar/gpdb,0x0FFF/gpdb,royc1/gpdb,royc1/gpdb,edespino/gpdb,xuegang/gpdb,kaknikhil/gpdb,50wu/gpdb,rvs/gpdb,Quikling/gpdb,cjcjameson/gpdb,lisakowen/gpdb,chrishajas/gpdb,50wu/gpdb,greenplum-db/gpdb,CraigHarris/gpdb,jmcatamney/gpdb,janebeckman/gpdb,rvs/gpdb,xinzweb/gpdb,janebeckman/gpdb,xuegang/gpdb,xinzweb/gpdb,0x0FFF/gpdb,kaknikhil/gpdb,janebeckman/gpdb,CraigHarris/gpdb,yuanzhao/gpdb,xuegang/gpdb,adam8157/gpdb,jmcatamney/gpdb,Chibin/gpdb,ahachete/gpdb,zaksoup/gpdb,yuanzhao/gpdb,cjcjameson/gpdb,0x0FFF/gpdb,Quikling/gpdb,xuegang/gpdb,Quikling/gpdb,edespino/gpdb,Quikling/gpdb,edespino/gpdb,greenplum-db/gpdb,lintzc/gpdb,cjcjameson/gpdb,xinzweb/gpdb,kaknikhil/gpdb,yuanzhao/gpdb,zaksoup/gpdb,royc1/gpdb,Chibin/gpdb,janebeckman/gpdb,lintzc/gpdb,Quikling/gpdb,50wu/gpdb,ashwinstar/gpdb,Quikling/gpdb,royc1/gpdb,jmcatamney/gpdb,edespino/gpdb,xinzweb/gpdb,50wu/gpdb,kaknikhil/gpdb,rvs/gpdb,xinzweb/gpdb,0x0FFF/gpdb,lisakowen/gpdb,chrishajas/gpdb,cjcjameson/gpdb,ashwinstar/gpdb,Chibin/gpdb,ashwinstar/gpdb,adam8157/gpdb,ahachete/gpdb,xuegang/gpdb,chrishajas/gpdb,janebeckman/gpdb,cjcjameson/gpdb,cjcjameson/gpdb,ashwinstar/gpdb,lisakowen/gpdb,lintzc/gpdb,ashwinstar/gpdb,CraigHarris/gpdb,adam8157/gpdb,chrishajas/gpdb,50wu/gpdb,lintzc/gpdb,jmcatamney/gpdb,edespino/gpdb,zaksoup/gpdb,adam8157/gpdb,royc1/gpdb,xuegang/gpdb,yuanzhao/gpdb,adam8157/gpdb,yuanzhao/gpdb,rvs/gpdb,greenplum-db/gpdb,yuanzhao/gpdb,rvs/gpdb,yuanzhao/gpdb,lisakowen/gpdb,adam8157/gpdb,edespino/gpdb,janebeckman/gpdb,chrishajas/gpdb,janebeckman/gpdb,lintzc/gpdb,zaksoup/gpdb,rvs/gpdb,Quikling/gpdb,Chibin/gpdb,yuanzhao/gpdb,adam8157/gpdb,rvs/gpdb,cjcjameson/gpdb,ashwinstar/gpdb,rvs/gpdb,lisakowen/gpdb,50wu/gpdb,edespino/gpdb,greenplum-db/gpdb,ahachete/gpdb,janebeckman/gpdb,xuegang/gpdb,kaknikhil/gpdb,janebeckman/gpdb,lintzc/gpdb,cjcjameson/gpdb,ashwinstar/gpdb,xinzweb/gpdb,ahachete/gpdb,royc1/gpdb,0x0FFF/gpdb,rvs/gpdb,Chibin/gpdb,lisakowen/gpdb,greenplum-db/gpdb,cjcjameson/gpdb,CraigHarris/gpdb,Chibin/gpdb,kaknikhil/gpdb,Quikling/gpdb,kaknikhil/gpdb,royc1/gpdb,ahachete/gpdb,xuegang/gpdb,cjcjameson/gpdb,xuegang/gpdb,zaksoup/gpdb,Chibin/gpdb,zaksoup/gpdb,CraigHarris/gpdb,kaknikhil/gpdb,zaksoup/gpdb,edespino/gpdb,janebeckman/gpdb,lisakowen/gpdb,rvs/gpdb,lisakowen/gpdb,ahachete/gpdb,CraigHarris/gpdb,Chibin/gpdb,kaknikhil/gpdb,0x0FFF/gpdb,greenplum-db/gpdb,Chibin/gpdb,ahachete/gpdb,chrishajas/gpdb,0x0FFF/gpdb,xinzweb/gpdb,edespino/gpdb,lintzc/gpdb,lintzc/gpdb,zaksoup/gpdb,Quikling/gpdb,jmcatamney/gpdb,50wu/gpdb,yuanzhao/gpdb,Chibin/gpdb,xinzweb/gpdb,CraigHarris/gpdb,50wu/gpdb,ahachete/gpdb,greenplum-db/gpdb,chrishajas/gpdb,yuanzhao/gpdb,CraigHarris/gpdb,jmcatamney/gpdb,jmcatamney/gpdb,Quikling/gpdb,lintzc/gpdb