Thread: Why are there client-only encodings?
I wanted to allow WIN1250 as a server-side encoding, in light of the Windows port. Now I wonder why there are client-only encodings at all. Without knowing details, it seems the client-only encodings are all "Windows world" encodings. So was the original reason not to allow these as server encodings that the server doesn't run on Windows? If so, should the category client-only encodings be abolished? -- Peter Eisentraut http://developer.postgresql.org/~petere/
> I wanted to allow WIN1250 as a server-side encoding, in light of the > Windows port. Now I wonder why there are client-only encodings at all. > Without knowing details, it seems the client-only encodings are all > "Windows world" encodings. So was the original reason not to allow > these as server encodings that the server doesn't run on Windows? If > so, should the category client-only encodings be abolished? I think it's not just possible for some multi-byte encodings such as SJIS(Shift-JIS) and Big5. Currently PostgreSQL will not accept them because of they include special ASCII characters such as back slashes. -- Tatsuo Ishii
Peter Eisentraut <peter_e@gmx.net> writes: > Now I wonder why there are client-only encodings at all. Backend encodings must follow the rule that non-first bytes of multibyte sequences must have the high bit set, so that they cannot be mistaken for ASCII characters. We allow client encodings to break that rule though. (If you look at psql's lexical processing you will see the cost we pay for that, and why I don't want to relax the rule in the backend.) The encodings that break this rule are some multibyte Far Eastern encodings (I forget which, but Tatsuo would know). There is certainly no reason that any single-byte ASCII-superset encoding couldn't be supported in the backend. regards, tom lane