Fix bugs in sqlchar_to_unicode and unicode_to_sqlchar: both were measuring
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 10 Nov 2008 18:02:27 +0000 (18:02 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 10 Nov 2008 18:02:27 +0000 (18:02 +0000)
commitbc76d22b76ad52314003cdcbf8988d7cda4639de
tree5ca306e821b17fe44b6a950ad3d27b245a6f2828
parentd202a5484a30f98d9ec98a024ce0ba3df389d74e
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.
src/backend/utils/adt/xml.c