Re: Doc: typo in config.sgml

From: Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, 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-11-19 10:31:21
Message-ID: 20241119193121.7ba727c489b5f0b6d20f9c25@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 18 Nov 2024 22:07:40 -0500
Bruce Momjian <bruce(at)momjian(dot)us> wrote:

> On Tue, Nov 19, 2024 at 11:29:07AM +0900, Yugo NAGATA wrote:
> > On Mon, 18 Nov 2024 16:04:20 -0500
> > > So, the failure of ligatures is caused usually by not using the right
> > > Adobe Font Metric (AFM) file, I think. I have seen faulty ligature
> > > rendering in PDFs but was alway able to fix it by using the right AFM
> > > file. Odds are, failure is caused by using a standard Latin1 AFM file
> > > and not the AFM file that matches the font being used.
> > >
> > > > [1] https://xmlgraphics.apache.org/fop/faq.html#pdf-characters
> > > >
> > > > However, it seems that using iconv to detect non-Latin1 characters may be still
> > > > useful because these are likely not displayed in PDF. For example, we can do this
> > > > in make check as the attached patch 0002. It cannot show the filname where one
> > > > is found, though.
> > >
> > > I was thinking something like:
> > >
> > > grep -l --recursive -P '[\x80-\xFF]' . |
> > > while read FILE
> > > do iconv -f UTF-8 -t ISO-8859-1 "$FILE" || exit 1
> > > done
> > >
> > > This only checks files with non-ASCII characters.
> >
> > Checking non-latin1 after non-ASCII characters seems good idea.
> > I attached a updated patch (0002) that uses perl instead of grep
> > because non-GNU grep could not have escape sequences for hex.
>
> Yes, good point.
>
> > > So, are we sure this will be the message even for non-English users? I
> > > thought checking for warning message text was too fragile.
> >
> > I am not sure whether fop has messages in non-English, although I've never
> > seen Japanese messages output.
> >
> > I wonder we can get unified results if executed with LANG=C.
> > The updated patch 0001 is fixed in this direction.
>
> Yes, good idea.
>
> > + @ ( $(PERL) -ne '/[\x80-\xFF]/ and `${ICONV} -t ISO-8859-1 -f UTF-8 "$$ARGV" 2>/dev/null` and print("$$ARGV:$$_"),$$n++; END {exit($$n>0)}' \
>
> I am thinking we should have -f before -t becaues it is from/to.

I've updated the patch 0002 to move -f before -t.

Also, I added a new patch 0003 that updates configure scripts to check
whether iconv exists. When it does not exist, the message
"ERROR: `iconv' is missing on your system." will be raised.
However, this change may be unnecessary since iconv is POSIX standard
and most of UNIX-like system would have it.

Regards,
Yugo Nagata

--
Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>

Attachment Content-Type Size
v3-0003-Check-whether-iconv-exists-for-detecting-non-lati.patch text/x-diff 6.1 KB
v3-0002-Check-non-latin1-characters-in-make-check.patch text/x-diff 1.6 KB
v3-0001-Disallow-characters-that-cannot-be-displayed-in-P.patch text/x-diff 922 bytes

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2024-11-19 11:05:29 Re: [PoC] Federated Authn/z with OAUTHBEARER
Previous Message vignesh C 2024-11-19 10:23:35 Re: Introduce XID age and inactive timeout based replication slot invalidation