Re: Doc: typo in config.sgml

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>
Cc: Tatsuo Ishii <ishii(at)postgresql(dot)org>, tgl(at)sss(dot)pgh(dot)pa(dot)us, daniel(at)yesql(dot)se, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Doc: typo in config.sgml
Date: 2024-10-14 19:05:35
Message-ID: Zw1rf7vm3FqpItw4@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Oct 11, 2024 at 12:36:53PM +0900, Yugo NAGATA wrote:
> On Fri, 11 Oct 2024 12:16:50 +0900 (JST)
> Tatsuo Ishii <ishii(at)postgresql(dot)org> wrote:
>
> > > We can check non-ASCII letters SGML/XML files by preparing "allowlist"
> > > that contains lines which are allowed to have non-ascii characters,
> > > although this list will need to be maintained when lines in it are modified.
> > > I've attached a patch to add a simple Perl script to do this.
> >
> > I doubt it really works. For example, nbsp can be used formatting
> > (that's the purpose of the character in the first place). Whenever a
> > developer decides to or not to use nbsp, "allowlist" needs to be
> > maintained. It's too annoying.
>
> I suppose non-ascii characters including nbsp are basically disallowed,
> so the allowlist will not increase unless there is some special reason.
>
> However, it is true that there might be a cost for maintaining the list
> more or less, so if people don't think it is worth adding this check,
> I will withdraw this proposal.l.

I did some more research and we able to clarify our behavior in
release.sgml:

We can only use Latin1 characters, not all UTF8 characters,
because rendering engines must support the referenced characters,
and they currently only support Latin1. In the SGML files we
encode non-ASCII Latin1 characters as HTML entities, e.g.,
&Aacute;lvaro Herrera. Oddly, it is possible to add Latin1
characters as UTF8, but we we currently prevent this via the
Makefile "check-non-ascii" check.

We used to use UTF8 characters in SGML files, but only UTF8 characters
that had Latin1 equivalents, and I think the toolchain would convert
UTF8 to Latin1 for us.

What I ended up doing was to change the UTF8 encoded characters to HTML
entities, and then modify the Makefile to check for any non-ASCII
characters. This will catch &nbsp; and any other UTF8 characters.

I also added a dummy 'pdf' target that is the same as the postgres.pdf
dummy target; we already had an "html" target, so I thought a "pdf" one
made sense.

Patch attached. I plan to apply this in a few days to master.

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

When a patient asks the doctor, "Am I going to die?", he means
"Am I going to die soon?"

Attachment Content-Type Size
latin1.diff text/x-diff 7.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Corey Huinker 2024-10-14 19:40:21 Re: Statistics Import and Export
Previous Message Tom Lane 2024-10-14 18:25:10 Re: ECPG cleanup and fix for clang compile-time problem