Package: postgresql-autodoc Version: 1.40-3 Followup-For: Bug #856567 Control: retitle 856567 postgresql_autodoc: mishandles German umlauts and other funny chars Control: severity 856567 important
This has just now started to produce bogus input, namely when nōn-ASCII chars are used in the database. For just umlauts: ~$ sudo su - postgres $ createdb -E UTF-8 -O postgres -T template0 -l de_DE.UTF-8 tstdb $ export LC_ALL=C.UTF-8 $ psql tstdb psql (10.0) Type "help" for help. tstdb=# CREATE FUNCTION tst() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN tstdb$# RAISE EXCEPTION 'mäh'; tstdb$# END; $$; CREATE FUNCTION tstdb=# \q $ postgresql_autodoc -d tstdb -f foo -t html Producing foo.html from /usr/share/postgresql_autodoc/html.tmpl $ fgrep -a -e \<meta -e RAISE foo.html <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> RAISE EXCEPTION 'm�h'; $ fgrep -a -e \<meta -e RAISE /usr/share/postgresql_autodoc/html.tmpl <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> When using Unicode characters beyond latin1, things get inconsistent: $ psql tstdb psql (10.0) Type "help" for help. tstdb=# CREATE FUNCTION tst2() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN RAISE EXCEPTION 'm€h'; END; $$; CREATE FUNCTION tstdb=# \q $ postgresql_autodoc -d tstdb -f foo -t html Producing foo.html from /usr/share/postgresql_autodoc/html.tmpl Wide character in print at /usr/bin/postgresql_autodoc line 1616. $ fgrep -a -e \<meta -e RAISE foo.html <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> RAISE EXCEPTION 'mäh'; RAISE EXCEPTION 'm€h'; -- System Information: Debian Release: buster/sid APT prefers unreleased APT policy: (500, 'unreleased'), (500, 'buildd-unstable'), (500, 'unstable') Architecture: x32 (x86_64) Foreign Architectures: i386, amd64 Kernel: Linux 4.12.0-1-amd64 (SMP w/8 CPU cores) Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8) Shell: /bin/sh linked to /bin/lksh Init: sysvinit (via /sbin/init) Versions of packages postgresql-autodoc depends on: ii libdbd-pg-perl 3.7.0-1 ii libhtml-template-perl 2.97-1 ii libterm-readkey-perl 2.37-1+b2 ii perl 5.26.1-2 Versions of packages postgresql-autodoc recommends: pn dia | dia-gnome <none> ii dillo [www-browser] 3.0.5-3 pn docbook-book <none> ii graphviz 2.38.0-18 ii links2 [www-browser] 2.14-4 ii lynx [www-browser] 2.8.9dev16-2 ii opera-static [www-browser] 9.64.2480.gcc4.qt3 postgresql-autodoc suggests no packages. -- no debconf information