Re: Unicode UTF-8 table formatting for psql text output
От
Peter Eisentraut
Тема
Re: Unicode UTF-8 table formatting for psql text output
Дата
Msg-id
1254687747.13655.11.camel@vanquo.pezone.net
Ответ на
Re: Unicode UTF-8 table formatting for psql text output (Roger Leigh)
Список
Дерево обсуждения
Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@debian.org>
Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@debian.org>
[PATCH 7/7] psql: Don't print leading - with expanded=1 and border=0 Roger Leigh <rleigh@debian.org>
Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@debian.org>
[PATCH 8/9] psql: print_aligned_vertical_line: Correct alignment Roger Leigh <rleigh@debian.org>
[PATCH 9/9] psql: print_aligned_vertical: Correct indentation Roger Leigh <rleigh@debian.org>
Re: Unicode UTF-8 table formatting for psql text output Robert Haas <robertmhaas@gmail.com>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Alvaro Herrera <alvherre@commandprompt.com>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Alvaro Herrera <alvherre@commandprompt.com>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Alvaro Herrera <alvherre@commandprompt.com>
Re: Unicode UTF-8 table formatting for psql text output Alvaro Herrera <alvherre@commandprompt.com>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Selena Deckelmann <selenamarie@gmail.com>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Selena Deckelmann <selenamarie@gmail.com>
Re: Unicode UTF-8 table formatting for psql text output Robert Haas <robertmhaas@gmail.com>
Re: Unicode UTF-8 table formatting for psql text output "Brad T. Sliger" <brad@sliger.org>
Re: Unicode UTF-8 table formatting for psql text output Peter Eisentraut <peter_e@gmx.net>
Re: Unicode UTF-8 table formatting for psql text output Tom Lane <tgl@sss.pgh.pa.us>
Re: Unicode UTF-8 table formatting for psql text output Peter Eisentraut <peter_e@gmx.net>
Re: Unicode UTF-8 table formatting for psql text output Tom Lane <tgl@sss.pgh.pa.us>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Andrew Dunstan <andrew@dunslane.net>
Re: Unicode UTF-8 table formatting for psql text output Tom Lane <tgl@sss.pgh.pa.us>
Re: Unicode UTF-8 table formatting for psql text output Andrew Dunstan <andrew@dunslane.net>
Re: Unicode UTF-8 table formatting for psql text output Peter Eisentraut <peter_e@gmx.net>
Re: Unicode UTF-8 table formatting for psql text output Andrew Dunstan <andrew@dunslane.net>
Re: Unicode UTF-8 table formatting for psql text output Alvaro Herrera <alvherre@commandprompt.com>
Re: Unicode UTF-8 table formatting for psql text output Peter Eisentraut <peter_e@gmx.net>
Re: Unicode UTF-8 table formatting for psql text output Tom Lane <tgl@sss.pgh.pa.us>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Tom Lane <tgl@sss.pgh.pa.us>
Re: Unicode UTF-8 table formatting for psql text output Peter Eisentraut <peter_e@gmx.net>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output "Brad T. Sliger" <brad@sliger.org>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Peter Eisentraut <peter_e@gmx.net>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Tom Lane <tgl@sss.pgh.pa.us>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Peter Eisentraut <peter_e@gmx.net>
Re: Unicode UTF-8 table formatting for psql text
output "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Tom Lane <tgl@sss.pgh.pa.us>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Peter Eisentraut <peter_e@gmx.net>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Peter Eisentraut <peter_e@gmx.net>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Greg Stark <gsstark@mit.edu>
Re: Unicode UTF-8 table formatting for psql text output Tom Lane <tgl@sss.pgh.pa.us>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Tom Lane <tgl@sss.pgh.pa.us>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text
output Bruce Momjian <bruce@momjian.us>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Tom Lane <tgl@sss.pgh.pa.us>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Tom Lane <tgl@sss.pgh.pa.us>
Re: Unicode UTF-8 table formatting for psql text output Peter Eisentraut <peter_e@gmx.net>
Re: Unicode UTF-8 table formatting for psql text output Tom Lane <tgl@sss.pgh.pa.us>
Re: Unicode UTF-8 table formatting for psql text output Peter Eisentraut <peter_e@gmx.net>
Re: Unicode UTF-8 table formatting for psql text output Greg Stark <gsstark@mit.edu>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Andrew Dunstan <andrew@dunslane.net>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Andrew Dunstan <andrew@dunslane.net>
Re: Unicode UTF-8 table formatting for psql text output Alvaro Herrera <alvherre@commandprompt.com>
Re: Unicode UTF-8 table formatting for psql text output "Brad T. Sliger" <brad@sliger.org>
Re: Unicode UTF-8 table formatting for psql text output Tom Lane <tgl@sss.pgh.pa.us>
Re: Unicode UTF-8 table formatting for psql text output Robert Haas <robertmhaas@gmail.com>
Re: Unicode UTF-8 table formatting for psql text output Peter Eisentraut <peter_e@gmx.net>
Re: Unicode UTF-8 table formatting for psql text output Robert Haas <robertmhaas@gmail.com>
Re: Unicode UTF-8 table formatting for psql text output Tom Lane <tgl@sss.pgh.pa.us>
Re: Unicode UTF-8 table formatting for psql text output Andrew Dunstan <andrew@dunslane.net>
Re: Unicode UTF-8 table formatting for psql text output Robert Haas <robertmhaas@gmail.com>
Re: Unicode UTF-8 table formatting for psql text output Alvaro Herrera <alvherre@commandprompt.com>
Re: Unicode UTF-8 table formatting for psql text output Tom Lane <tgl@sss.pgh.pa.us>
Re: Unicode UTF-8 table formatting for psql text output Alvaro Herrera <alvherre@commandprompt.com>
Re: Unicode UTF-8 table formatting for psql text output Andrew Dunstan <andrew@dunslane.net>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Tom Lane <tgl@sss.pgh.pa.us>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Tom Lane <tgl@sss.pgh.pa.us>
Re: Unicode UTF-8 table formatting for psql text output Roger Leigh <rleigh@codelibre.net>
Re: Unicode UTF-8 table formatting for psql text output Tom Lane <tgl@sss.pgh.pa.us>
Re: Unicode UTF-8 table formatting for psql text output Greg Stark <gsstark@mit.edu>
Re: Unicode UTF-8 table formatting for psql text output Andrew Dunstan <andrew@dunslane.net>
I have a comment on this bit: > @@ -125,6 +128,17 @@ main(int argc, char *argv[]) > > /* We rely on unmentioned fields of pset.popt to start out > 0/false/NULL */ > pset.popt.topt.format = PRINT_ALIGNED; > + > + /* Default table style to plain ASCII */ > + pset.popt.topt.table_style = &asciiformat; > +#if (defined(HAVE_LANGINFO_H) && defined(CODESET)) > + /* If a UTF-8 locale is available, switch to UTF-8 box drawing > characters */ > + if (pg_strcasecmp(nl_langinfo(CODESET), "UTF-8") == 0 || > + pg_strcasecmp(nl_langinfo(CODESET), "utf8") == 0 || > + pg_strcasecmp(nl_langinfo(CODESET), "CP65001") == 0) > + pset.popt.topt.table_style = &utf8format; > +#endif > + > pset.popt.topt.border = 1; > pset.popt.topt.pager = 1; > pset.popt.topt.start_table = true; Elsewhere in the psql code, notably in mbprint.c, we make the decision on whether to apply certain Unicode-aware processing based on whether the client encoding is UTF8. The same should be done here. There is a patch somewhere in the pipeline that would automatically set the psql client encoding to whatever the locale says, but until that is done, the client encoding should be the sole setting that rules what kind of character set processing is done on the client side.
В списке pgsql-hackers по дате отправления