Tatsuo Ishii <ishii@postgresql.org> writes: >> Another way, given that we only really need this to work for >> SJIS, is to hard-wire the logic into path.c --- it's not like >> pg_sjis_mblen is either long or likely to change. That's >> ugly but would be a lot less invasive and safer to back-patch. >> I'm leaning a bit to the second way, mainly because of the >> extern-relocation annoyance.
> +1. I believe the logic of detecting byte length in Shift-JIS will not > be changed.
OK. I know I said I wasn't going to write this, but here's a draft patch that assumes we need only touch psql and can rely on its idea of client_encoding.