Re: Unicode UTF-8 table formatting for psql text output - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Unicode UTF-8 table formatting for psql text output
Date
Msg-id 20090823223349.GC5287@alvh.no-ip.org
Whole thread Raw
In response to Re: Unicode UTF-8 table formatting for psql text output  (Roger Leigh <rleigh@codelibre.net>)
Responses Re: Unicode UTF-8 table formatting for psql text output  (Roger Leigh <rleigh@codelibre.net>)
List 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


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [PATCH 5/6] psql: print_aligned_text uses table formatting
Next
From: Greg Stark
Date:
Subject: Re: clang's static checker report.