From 09022de1f55708bcfe8b2bf206d818055c34d49e Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 4 Jul 2012 00:29:57 -0400 Subject: Improve documentation about MULE encoding. This commit improves the comments in pg_wchar.h and creates #define symbols for some formerly hard-coded values. No substantive code changes. Tatsuo Ishii and Tom Lane --- src/backend/utils/mb/wchar.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/backend/utils/mb/wchar.c') diff --git a/src/backend/utils/mb/wchar.c b/src/backend/utils/mb/wchar.c index 03d68119d1c..2e1db5ebf4b 100644 --- a/src/backend/utils/mb/wchar.c +++ b/src/backend/utils/mb/wchar.c @@ -742,6 +742,12 @@ pg_mule_dsplen(const unsigned char *s) { int len; + /* + * Note: it's not really appropriate to assume that all multibyte charsets + * are double-wide on screen. But this seems an okay approximation for + * the MULE charsets we currently support. + */ + if (IS_LC1(*s)) len = 1; else if (IS_LCPRV1(*s)) -- cgit v1.2.3