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.

ashwinstar/gpdb,Chibin/gpdb,yuanzhao/gpdb,Chibin/gpdb,Chibin/gpdb,yuanzhao/gpdb,Chibin/gpdb,techdragon/Postgres-XL,tpostgres-projects/tPostgres,techdragon/Postgres-XL,oberstet/postgres-xl,kmjungersen/PostgresXL,jmcatamney/gpdb,xinzweb/gpdb,jmcatamney/gpdb,jmcatamney/gpdb,lisakowen/gpdb,50wu/gpdb,lisakowen/gpdb,yuanzhao/gpdb,edespino/gpdb,greenplum-db/gpdb,snaga/postgres-xl,postmind-net/postgres-xl,snaga/postgres-xl,Chibin/gpdb,xinzweb/gpdb,pavanvd/postgres-xl,greenplum-db/gpdb,xinzweb/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,Chibin/gpdb,arcivanov/postgres-xl,techdragon/Postgres-XL,tpostgres-projects/tPostgres,arcivanov/postgres-xl,snaga/postgres-xl,ashwinstar/gpdb,yuanzhao/gpdb,50wu/gpdb,jmcatamney/gpdb,Postgres-XL/Postgres-XL,adam8157/gpdb,kmjungersen/PostgresXL,tpostgres-projects/tPostgres,techdragon/Postgres-XL,jmcatamney/gpdb,zeroae/postgres-xl,ovr/postgres-xl,edespino/gpdb,Chibin/gpdb,xinzweb/gpdb,yuanzhao/gpdb,ashwinstar/gpdb,50wu/gpdb,adam8157/gpdb,oberstet/postgres-xl,zeroae/postgres-xl,Postgres-XL/Postgres-XL,Chibin/gpdb,edespino/gpdb,tpostgres-projects/tPostgres,ovr/postgres-xl,zeroae/postgres-xl,snaga/postgres-xl,lisakowen/gpdb,greenplum-db/gpdb,50wu/gpdb,yazun/postgres-xl,50wu/gpdb,greenplum-db/gpdb,pavanvd/postgres-xl,edespino/gpdb,postmind-net/postgres-xl,ashwinstar/gpdb,jmcatamney/gpdb,postmind-net/postgres-xl,yuanzhao/gpdb,ovr/postgres-xl,yazun/postgres-xl,techdragon/Postgres-XL,zeroae/postgres-xl,oberstet/postgres-xl,edespino/gpdb,tpostgres-projects/tPostgres,zeroae/postgres-xl,postmind-net/postgres-xl,adam8157/gpdb,Chibin/gpdb,kmjungersen/PostgresXL,yazun/postgres-xl,xinzweb/gpdb,yuanzhao/gpdb,adam8157/gpdb,Postgres-XL/Postgres-XL,ashwinstar/gpdb,greenplum-db/gpdb,ovr/postgres-xl,adam8157/gpdb,yuanzhao/gpdb,yazun/postgres-xl,edespino/gpdb,pavanvd/postgres-xl,greenplum-db/gpdb,edespino/gpdb,edespino/gpdb,edespino/gpdb,lisakowen/gpdb,yuanzhao/gpdb,pavanvd/postgres-xl,lisakowen/gpdb,kmjungersen/PostgresXL,edespino/gpdb,Postgres-XL/Postgres-XL,greenplum-db/gpdb,ovr/postgres-xl,lisakowen/gpdb,50wu/gpdb,arcivanov/postgres-xl,oberstet/postgres-xl,arcivanov/postgres-xl,Chibin/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,arcivanov/postgres-xl,xinzweb/gpdb,pavanvd/postgres-xl,snaga/postgres-xl,yuanzhao/gpdb,50wu/gpdb,xinzweb/gpdb,adam8157/gpdb,xinzweb/gpdb,Postgres-XL/Postgres-XL,arcivanov/postgres-xl,ashwinstar/gpdb,50wu/gpdb,kmjungersen/PostgresXL,postmind-net/postgres-xl,lisakowen/gpdb,lisakowen/gpdb,adam8157/gpdb,oberstet/postgres-xl,yazun/postgres-xl,adam8157/gpdb,jmcatamney/gpdb