Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tDEak-00GvVQ-Lf for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Nov 2024 03:07:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tDEai-009tPH-CB for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Nov 2024 03:07:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tDEai-009tP8-1f for pgsql-hackers@lists.postgresql.org; Tue, 19 Nov 2024 03:07:48 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tDEag-002frL-5J; Tue, 19 Nov 2024 03:07:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2024011501; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=hIYCB4r2G1lpxWV9IK3+xxmGE6w6wkutryrGHNNMRnI=; b=axwKs 6nkaqKJtb/Vaq7bm3SVMA0uqdppyK85c4N2vKebNbQrVAbCN+GvKuERWvqfIUSnlLNJywz10UEGQP PugOUp1MewkOTxYFaPfeYIivMPBK36L+NMQMrst2/Lou3NUuxfYmCttF4fNBxG8PaT0MZOYOn41+3 +Nf33E/nlBlzPYNCtwYjVNCn8IwbufHllRtFY2U8TZNxMyC6Hjro4UsAwmNOvD31Xwj8nXAO60cMK 9WT0JUmxYjcc/4GT8gYyWD5mLNQuHhWxCC4IzQ9IvM2NILiB5kUUG9x40Q1gW5BFUYOufvwCzcshq Ce8JJVDFGLx18wLYr0ku5JSsPrX5g==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1tDEaa-002asD-1F; Mon, 18 Nov 2024 22:07:40 -0500 Date: Mon, 18 Nov 2024 22:07:40 -0500 From: Bruce Momjian To: Yugo NAGATA Cc: Peter Eisentraut , Tatsuo Ishii , tgl@sss.pgh.pa.us, daniel@yesql.se, pgsql-hackers@postgresql.org Subject: Re: Doc: typo in config.sgml Message-ID: References: <20241102.072700.1635141881080027242.ishii@postgresql.org> <20241102.120212.1541205818288992834.ishii@postgresql.org> <7491a14c-2215-46f0-87fe-ce30ae9eb4f6@eisentraut.org> <20241111220215.8aef4df0f8d541df61abad57@sraoss.co.jp> <20241119112907.1cdfe086df16e7ac173f9571@sraoss.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241119112907.1cdfe086df16e7ac173f9571@sraoss.co.jp> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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 like this approach. -- Bruce Momjian 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?"