Re: Unicode UTF-8 table formatting for psql text output

Alvaro Herrera <alvherre@commandprompt.com>

From: Alvaro Herrera <alvherre@commandprompt.com>
To: Roger Leigh <rleigh@codelibre.net>
Cc: Robert Haas <robertmhaas@gmail.com>, Roger Leigh <rleigh@debian.org>, pgsql-hackers@postgresql.org
Date: 2009-08-23T22:33:49Z
Lists: pgsql-hackers
Roger Leigh escribió:

> +#if (defined(HAVE_LANGINFO_H) && defined(CODESET))
> +	if (!strcmp(nl_langinfo(CODESET), "UTF-8"))
> +		text_format = &utf8format;
> +#endif

I think you should also try to match to "UTF8", and do it in
case-insensitive manner (pg_strcasecmp), just like chklocale.c.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support