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

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Roger Leigh <rleigh(at)codelibre(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Roger Leigh <rleigh(at)debian(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Unicode UTF-8 table formatting for psql text output
Date: 2009-08-23 22:33:49
Message-ID: 20090823223349.GC5287@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2009-08-23 23:15:43 Re: clang's static checker report.
Previous Message Alvaro Herrera 2009-08-23 22:29:12 Re: [PATCH 5/6] psql: print_aligned_text uses table formatting