summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/ChangeLog6
-rw-r--r--Build/source/texk/web2c/Makefile.in139
-rw-r--r--Build/source/texk/web2c/am/web.am4
-rw-r--r--Build/source/texk/web2c/pdftexdir/am/pdftex.am9
-rwxr-xr-xBuild/source/texk/web2c/pdftexdir/wcfname.test33
-rw-r--r--Build/source/texk/web2c/ptexdir/am/ptex.am4
-rwxr-xr-xBuild/source/texk/web2c/ptexdir/wcfname.test2
-rw-r--r--Build/source/texk/web2c/tests/fn¢£¥µÆØß-utf8.tex23
-rw-r--r--Build/source/texk/web2c/uptexdir/am/uptex.am4
-rwxr-xr-xBuild/source/texk/web2c/uptexdir/wcfname.test2
-rw-r--r--Build/source/texk/web2c/xetexdir/am/xetex.am9
-rwxr-xr-xBuild/source/texk/web2c/xetexdir/wcfname.test32
12 files changed, 192 insertions, 75 deletions
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog
index ae04242326c..0e064996363 100644
--- a/Build/source/texk/web2c/ChangeLog
+++ b/Build/source/texk/web2c/ChangeLog
@@ -1,3 +1,9 @@
+2022-12-22 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
+
+ * Makefile.in, tests/fn{¢£¥µÆØß,±×÷§¶}-utf8.tex,
+ tests/fnさざ波-{utf8,euc,sjis}.tex, tests/fn-{utf8,euc,sjis}.txt:
+ Tests for file names with wide characters & {pdf,Xe,p,up}TeX.
+
2022-09-28 Karl Berry <karl@freefriends.org>
* tex.ch (halting_on_error_p): new variable, set when we start to
diff --git a/Build/source/texk/web2c/Makefile.in b/Build/source/texk/web2c/Makefile.in
index 6adb132b638..a4e80ee6438 100644
--- a/Build/source/texk/web2c/Makefile.in
+++ b/Build/source/texk/web2c/Makefile.in
@@ -3238,14 +3238,18 @@ EXTRA_DIST = PROJECTS cftests cpascal.h help.h w2c/config.h \
tests/bibtex-bigauth.aux tests/bibtex-bigauth.bib \
tests/bibtex-bigauth.tex tests/auxinclude.aux \
tests/auxinclude.bbl tests/auxinclude.bib tests/auxinclude.tex \
- tests/auxinclude2.aux tests/auxinclude2.tex tests/allbib.aux \
- tests/allbib.tex tests/apalike.bst tests/badpl.pl \
- tests/badtfm.tfm tests/badvf.tfm tests/badvf.vf \
- tests/badvpl.vpl tests/batch.tex tests/check.log \
- tests/cmr10.600gf tests/cmr10.pk tests/cmr10.pl \
- tests/cmr10.tfm tests/cmr7.tfm tests/cmr8.tfm tests/cmti10.tfm \
- tests/cmtt10.tfm tests/cmtt8.tfm tests/dict tests/eight.tex \
- tests/end.tex tests/exampl.aux tests/exampl.tex tests/gray.tfm \
+ tests/auxinclude2.aux tests/auxinclude2.tex \
+ tests/fn¢£¥µÆØß-utf8.tex tests/fn±×÷§¶-utf8.tex \
+ tests/fnさざ波-utf8.txt tests/fnさざ波-euc.tex \
+ tests/fnさざ波-sjis.tex tests/fn-utf8.txt tests/fn-euc.txt \
+ tests/fn-sjis.txt tests/allbib.aux tests/allbib.tex \
+ tests/apalike.bst tests/badpl.pl tests/badtfm.tfm \
+ tests/badvf.tfm tests/badvf.vf tests/badvpl.vpl \
+ tests/batch.tex tests/check.log tests/cmr10.600gf \
+ tests/cmr10.pk tests/cmr10.pl tests/cmr10.tfm tests/cmr7.tfm \
+ tests/cmr8.tfm tests/cmti10.tfm tests/cmtt10.tfm \
+ tests/cmtt8.tfm tests/dict tests/eight.tex tests/end.tex \
+ tests/exampl.aux tests/exampl.tex tests/gray.tfm \
tests/hello.tex tests/io.mf tests/just.texi tests/label.mp \
tests/label.mpx tests/logo8.tfm tests/longline.aux \
tests/longline.bib tests/longline.tex tests/longtfm.tex \
@@ -3666,57 +3670,58 @@ DISTCLEANFILES = CXXLD.sh tangle.c tangle.h tangle.p tangle-web2c \
$(pweb_programs:=.h) $(pweb_programs:=.p) \
$(pweb_programs:=-web2c) $(pweb_programs:=.web) \
ptests/nissya_bib.* ptests/xexampl.aux ptests/xexampl.bbl \
- ptests/xexampl.blg ptests/xenc*.* ptests/memtest.bib \
- ptests/memtest?.* ptests/xstory.dvityp ptests/xpagenum.typ \
- ptests/xptex[34]*.typ ptests/xcmr10.tfm ptests/xcmr10.pl \
- ptests/xsample*.typ ptests/x*min10.* ptests/xchcode*.* \
- ptests/xskipjfmp.* ptrip.diffs $(nodist_eptex_SOURCES) \
- eptex.web eptex.ch eptex-web2c eptex.p eptex.pool eptex-tangle \
- eptrip.diffs pdfprimitive-eptex.* $(nodist_uptex_SOURCES) \
- uptex.web uptex.ch uptex-web2c uptex.p uptex.pool uptex-tangle \
- $(upweb_programs:=.c) $(upweb_programs:=.h) \
- $(upweb_programs:=.p) $(upweb_programs:=-web2c) \
- $(upweb_programs:=.web) uptests/nissya_bib.* \
- uptests/xexampl.aux uptests/xexampl.bbl uptests/xexampl.blg \
- uptests/xenc*.* uptests/memtest.bib uptests/memtest?.* \
- uptests/xstory.dvityp uptests/xpagenum.typ \
- uptests/x*ptex[34]*.typ uptests/xcmr10.tfm uptests/xcmr10.pl \
- uptests/xsample*.typ uptests/x*min10.* uptests/xchcode*.* \
- uptests/xtestnewu.* uptests/xuparse.* uptests/yuparse.* \
- uptests/ygkhuge*.* uptests/xskipjfmp.* uptrip.diffs \
- $(nodist_euptex_SOURCES) euptex.web euptex.ch euptex-web2c \
- euptex.p euptex.pool euptex-tangle euptrip.diffs \
- pdfprimitive-euptex.* $(nodist_hitex_SOURCES) \
- $(nodist_hishrink_SOURCES) $(nodist_histretch_SOURCES) \
- hiformat-tangle hitex-tangle hello.log rule.log \
- $(nodist_pdftex_SOURCES) pdftex-final.ch pdftex-web2c pdftex.p \
- pdftex.pool pdftex-tangle pwprob.log pwprob.tex pdfimage.fmt \
- pdfimage.log pdfimage.pdf expanded.log cnfline.log \
- partoken-ok.log partoken-xfail.log postV3.afm postV7.afm \
- test-13.pdf test-13.xref test-15.pdf test-15.xref \
- $(nodist_libluatex_sources) luaimage.* luajitimage.* \
- $(nodist_xetex_SOURCES) xetex.web xetex-final.ch xetex-web2c \
- xetex.p xetex.pool xetex-tangle bug73.fmt bug73.log bug73.out \
- bug73.tex filedump.log filedump.out filedump.tex \
- $(omegaware_programs:=.c) $(omegaware_programs:=.h) \
- $(omegaware_programs:=.p) $(omegaware_programs:=-web2c) \
- ofm2opl.web opl2ofm.web ovf2ovp.web ovp2ovf.web \
- omegaware/bad*.* omegaware/tests/charwdr.* \
- omegaware/tests/charwdv.* omegaware/tests/xcheck* \
- omegaware/tests/xlevel1.* omegaware/tests/xlig*.* ofont*vf \
- omegaware/tests/xpagenum.* omegaware/tests/xofont* \
- omegaware/tests/Cherokee.tfm omegaware/tests/OCherokee.ofm \
- omegaware/tests/OCherokee.opl omegaware/tests/OCherokee.ovf \
- omegaware/tests/xCherokee.* omegaware/tests/xOCherokee.* \
- ocftest.* omegaware/tests/xinbmp* omegaware/tests/xoverbmp* \
- omegaware/tests/xrealnum.* omegaware/tests/xrepeated.* \
- omegaware/tests/sample*.ofm omegaware/tests/sample*.ovf \
- omegaware/tests/sample1-h.opl omegaware/tests/xsample*.out \
- omegaware/tests/shortend.* omegaware/tests/specialhex.ofm \
- omegaware/tests/specialhex.opl omegaware/tests/specialhex.ovf \
- omegaware/tests/xspecialhex.* omegaware/tests/yrepeat* \
- omegaware/tests/*yarabic* $(nodist_aleph_SOURCES) aleph.web \
- aleph.ch aleph-web2c aleph.p aleph.pool aleph-tangle
+ ptests/xexampl.blg ptests/xenc*.* ptests/fn*.* \
+ ptests/memtest.bib ptests/memtest?.* ptests/xstory.dvityp \
+ ptests/xpagenum.typ ptests/xptex[34]*.typ ptests/xcmr10.tfm \
+ ptests/xcmr10.pl ptests/xsample*.typ ptests/x*min10.* \
+ ptests/xchcode*.* ptests/xskipjfmp.* ptrip.diffs \
+ $(nodist_eptex_SOURCES) eptex.web eptex.ch eptex-web2c eptex.p \
+ eptex.pool eptex-tangle eptrip.diffs pdfprimitive-eptex.* \
+ $(nodist_uptex_SOURCES) uptex.web uptex.ch uptex-web2c uptex.p \
+ uptex.pool uptex-tangle $(upweb_programs:=.c) \
+ $(upweb_programs:=.h) $(upweb_programs:=.p) \
+ $(upweb_programs:=-web2c) $(upweb_programs:=.web) \
+ uptests/nissya_bib.* uptests/xexampl.aux uptests/xexampl.bbl \
+ uptests/xexampl.blg uptests/xenc*.* uptests/fn*.* \
+ uptests/memtest.bib uptests/memtest?.* uptests/xstory.dvityp \
+ uptests/xpagenum.typ uptests/x*ptex[34]*.typ \
+ uptests/xcmr10.tfm uptests/xcmr10.pl uptests/xsample*.typ \
+ uptests/x*min10.* uptests/xchcode*.* uptests/xtestnewu.* \
+ uptests/xuparse.* uptests/yuparse.* uptests/ygkhuge*.* \
+ uptests/xskipjfmp.* uptrip.diffs $(nodist_euptex_SOURCES) \
+ euptex.web euptex.ch euptex-web2c euptex.p euptex.pool \
+ euptex-tangle euptrip.diffs pdfprimitive-euptex.* \
+ $(nodist_hitex_SOURCES) $(nodist_hishrink_SOURCES) \
+ $(nodist_histretch_SOURCES) hiformat-tangle hitex-tangle \
+ hello.log rule.log $(nodist_pdftex_SOURCES) pdftex-final.ch \
+ pdftex-web2c pdftex.p pdftex.pool pdftex-tangle pwprob.log \
+ pwprob.tex pdfimage.fmt pdfimage.log pdfimage.pdf expanded.log \
+ cnfline.log partoken-ok.log partoken-xfail.log pdftests/fn*.* \
+ postV3.afm postV7.afm test-13.pdf test-13.xref test-15.pdf \
+ test-15.xref $(nodist_libluatex_sources) luaimage.* \
+ luajitimage.* $(nodist_xetex_SOURCES) xetex.web xetex-final.ch \
+ xetex-web2c xetex.p xetex.pool xetex-tangle bug73.fmt \
+ bug73.log bug73.out bug73.tex filedump.log filedump.out \
+ filedump.tex xetests/fn*.* $(omegaware_programs:=.c) \
+ $(omegaware_programs:=.h) $(omegaware_programs:=.p) \
+ $(omegaware_programs:=-web2c) ofm2opl.web opl2ofm.web \
+ ovf2ovp.web ovp2ovf.web omegaware/bad*.* \
+ omegaware/tests/charwdr.* omegaware/tests/charwdv.* \
+ omegaware/tests/xcheck* omegaware/tests/xlevel1.* \
+ omegaware/tests/xlig*.* ofont*vf omegaware/tests/xpagenum.* \
+ omegaware/tests/xofont* omegaware/tests/Cherokee.tfm \
+ omegaware/tests/OCherokee.ofm omegaware/tests/OCherokee.opl \
+ omegaware/tests/OCherokee.ovf omegaware/tests/xCherokee.* \
+ omegaware/tests/xOCherokee.* ocftest.* omegaware/tests/xinbmp* \
+ omegaware/tests/xoverbmp* omegaware/tests/xrealnum.* \
+ omegaware/tests/xrepeated.* omegaware/tests/sample*.ofm \
+ omegaware/tests/sample*.ovf omegaware/tests/sample1-h.opl \
+ omegaware/tests/xsample*.out omegaware/tests/shortend.* \
+ omegaware/tests/specialhex.ofm omegaware/tests/specialhex.opl \
+ omegaware/tests/specialhex.ovf omegaware/tests/xspecialhex.* \
+ omegaware/tests/yrepeat* omegaware/tests/*yarabic* \
+ $(nodist_aleph_SOURCES) aleph.web aleph.ch aleph-web2c aleph.p \
+ aleph.pool aleph-tangle
CLEANFILES = $(EXTRA_PROGRAMS) $(EXTRA_LIBRARIES) $(EXTRA_LTLIBRARIES)
TRIPTRAP_CLEAN = $(am__append_8) $(am__append_18) $(am__append_27) \
$(am__append_36) $(am__append_44) $(am__append_60) \
@@ -4792,7 +4797,8 @@ pdftex_ch_srcs = \
#
pdftex_tests = pdftexdir/wprob.test pdftexdir/pdftex.test \
pdftexdir/pdfimage.test pdftexdir/expanded.test \
- pdftexdir/tests/cnfline.test pdftexdir/tests/partoken.test
+ pdftexdir/tests/cnfline.test pdftexdir/tests/partoken.test \
+ pdftexdir/wcfname.test
ttf2afm_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/pdftexdir
ttf2afm_SOURCES = pdftexdir/ttf2afm.c
@@ -5507,7 +5513,8 @@ libxetex_prereq = xetexd.h $(xetex_dependencies)
xetex_tests = \
xetexdir/xetex-filedump.test \
xetexdir/xetex-bug73.test \
- xetexdir/xetex.test
+ xetexdir/xetex.test \
+ xetexdir/wcfname.test
omegaware_programs = odvicopy odvitype otangle wofm2opl wopl2ofm wovf2ovp wovp2ovf
ow_tangle = WEBINPUTS=$(srcdir)/omegaware $(buildenv) $(TANGLE)
@@ -22078,7 +22085,7 @@ ptex.web: tie$(EXEEXT) $(ptex_web_srcs)
ptex.ch: tie$(EXEEXT) ptex.web $(ptex_ch_srcs)
$(tie_c) ptex.web $(ptex_ch_srcs)
ptexdir/ptriptest.log: ptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
-ptexdir/pver.log: ptex$(EXEEXT)
+ptexdir/pver.log ptexdir/wcfname.log: ptex$(EXEEXT)
#pweb_tests = \
# ptexdir/pbibtex.test \
# ptexdir/pdvitype.test \
@@ -22206,7 +22213,7 @@ uptftopl.p: tangle$(EXEEXT) uptftopl.web uptexdir/uptftopl.ch
uptftopl.web: tie$(EXEEXT) tftopl.web tftopl.ch
$(tie_m) tftopl.web tftopl.ch
uptexdir/uptriptest.log: uptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
-uptexdir/upver.log uptexdir/upkcat.log: uptex$(EXEEXT)
+uptexdir/upver.log uptexdir/upkcat.log uptexdir/wcfname.log: uptex$(EXEEXT)
uptexdir/upbibtex.log: upbibtex$(EXEEXT)
uptexdir/updvitype.log: updvitype$(EXEEXT)
uptexdir/uppltotf.log: uppltotf$(EXEEXT)
@@ -22324,7 +22331,8 @@ pdftex.tex: $(srcdir)/pdftexdir/pdftex.web
pdftexdir/wprob.log pdftexdir/pdftex.log \
pdftexdir/pdfimage.log pdftexdir/expanded.log \
- pdftexdir/tests/cnfline.log pdftexdir/tests/partoken.log: pdftex$(EXEEXT)
+ pdftexdir/tests/cnfline.log pdftexdir/tests/partoken.log \
+ pdftexdir/wcfname.log: pdftex$(EXEEXT)
# (end of pdftex.am)
pdftexdir/ttf2afm.log: ttf2afm$(EXEEXT)
@@ -22467,7 +22475,8 @@ $(srcdir)/xetexdir/xetex_version.h: @MAINTAINER_MODE_TRUE@ xetexdir/xetex.web
xetex-final.ch: tie$(EXEEXT) $(xetex_ch_srcs)
$(tie_c) $(xetex_ch_srcs)
$(libxetex_a_OBJECTS): $(libxetex_prereq)
-xetexdir/xetex-filedump.log xetexdir/xetex-bug73.log xetexdir/xetex.log: xetex$(EXEEXT)
+xetexdir/xetex-filedump.log xetexdir/xetex-bug73.log xetexdir/xetex.log \
+ xetexdir/wcfname.log: xetex$(EXEEXT)
# (end of xetex.am)
odvicopy.c odvicopy.h: odvicopy-web2c
diff --git a/Build/source/texk/web2c/am/web.am b/Build/source/texk/web2c/am/web.am
index 1aac496c7da..dbcb66bb2b5 100644
--- a/Build/source/texk/web2c/am/web.am
+++ b/Build/source/texk/web2c/am/web.am
@@ -237,6 +237,10 @@ DISTCLEANFILES += badvf.* tests/xptmr*.vpl
DISTCLEANFILES += badvpl.* tests/yptmr*.*
## weave.test
DISTCLEANFILES += pooltype.tex
+## {pdftexdir,xetexdir,ptexdir,uptexdir}/wcfname.test
+EXTRA_DIST += tests/fn¢£¥µÆØß-utf8.tex tests/fn±×÷§¶-utf8.tex
+EXTRA_DIST += tests/fnさざ波-utf8.txt tests/fnさざ波-euc.tex tests/fnさざ波-sjis.tex
+EXTRA_DIST += tests/fn-utf8.txt tests/fn-euc.txt tests/fn-sjis.txt
## Test data
##
diff --git a/Build/source/texk/web2c/pdftexdir/am/pdftex.am b/Build/source/texk/web2c/pdftexdir/am/pdftex.am
index 58d51fa06da..ac081b952de 100644
--- a/Build/source/texk/web2c/pdftexdir/am/pdftex.am
+++ b/Build/source/texk/web2c/pdftexdir/am/pdftex.am
@@ -105,11 +105,13 @@ EXTRA_DIST += \
#
pdftex_tests = pdftexdir/wprob.test pdftexdir/pdftex.test \
pdftexdir/pdfimage.test pdftexdir/expanded.test \
- pdftexdir/tests/cnfline.test pdftexdir/tests/partoken.test
+ pdftexdir/tests/cnfline.test pdftexdir/tests/partoken.test \
+ pdftexdir/wcfname.test
pdftexdir/wprob.log pdftexdir/pdftex.log \
pdftexdir/pdfimage.log pdftexdir/expanded.log \
- pdftexdir/tests/cnfline.log pdftexdir/tests/partoken.log: pdftex$(EXEEXT)
+ pdftexdir/tests/cnfline.log pdftexdir/tests/partoken.log \
+ pdftexdir/wcfname.log: pdftex$(EXEEXT)
EXTRA_DIST += $(pdftex_tests)
@@ -138,4 +140,7 @@ DISTCLEANFILES += cnfline.log
EXTRA_DIST += tests/partoken-ok.tex tests/partoken-xfail.tex
DISTCLEANFILES += partoken-ok.log partoken-xfail.log
+## wcfname.test
+DISTCLEANFILES += pdftests/fn*.*
+
# (end of pdftex.am)
diff --git a/Build/source/texk/web2c/pdftexdir/wcfname.test b/Build/source/texk/web2c/pdftexdir/wcfname.test
new file mode 100755
index 00000000000..edca432d83f
--- /dev/null
+++ b/Build/source/texk/web2c/pdftexdir/wcfname.test
@@ -0,0 +1,33 @@
+#! /bin/sh -vx
+#
+# Copyright 2022 Japanese TeX Development Community <issue@texjp.org>
+# You may freely use, modify and/or distribute this file.
+
+test -d pdftests || mkdir -p pdftests
+rm -f pdftests/fn*.log pdftests/fn*.txt pdftests/fn*.tex
+
+rc=0
+
+TEXMFCNF=$srcdir/../kpathsea
+TEXINPUTS=$srcdir/tests:.
+export TEXMFCNF TEXINPUTS
+
+if [ "$COMSPEC" != "" ]; then
+ echo "*** We guess OS is Windows."
+ command_line_encoding=utf8
+ export command_line_encoding
+fi
+
+fenc="utf8"
+for doc in fn¢£¥µÆØß-$fenc fnさざ波-$fenc; do
+
+ echo '>>> Document:'$doc ' File Encoding:'$fenc
+ ./pdftex -ini -interaction nonstopmode -jobname=$doc --shell-escape $doc.tex >pdftests/$doc-term.log || $rc=1
+ mv $doc.txt $doc.log $doc-tmp.tex pdftests/
+## It does not work.
+## diff pdftests/$doc.txt $srcdir/tests/fn-$enc.txt || $rc=2
+
+done
+
+
+exit $rc
diff --git a/Build/source/texk/web2c/ptexdir/am/ptex.am b/Build/source/texk/web2c/ptexdir/am/ptex.am
index 27ddcbd897f..d107f217022 100644
--- a/Build/source/texk/web2c/ptexdir/am/ptex.am
+++ b/Build/source/texk/web2c/ptexdir/am/ptex.am
@@ -173,7 +173,7 @@ EXTRA_DIST += \
#
ptex_tests = ptexdir/ptriptest.test ptexdir/pver.test ptexdir/wcfname.test
ptexdir/ptriptest.log: ptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
-ptexdir/pver.log: ptex$(EXEEXT)
+ptexdir/pver.log ptexdir/wcfname.log: ptex$(EXEEXT)
#pweb_tests = \
# ptexdir/pbibtex.test \
# ptexdir/pdvitype.test \
@@ -224,7 +224,7 @@ EXTRA_DIST += tests/testfield.bst tests/enc-asc.bib tests/enc-jis.bib tests/enc-
tests/enc.aux tests/enc-e.aux tests/enc-s.aux tests/enc-u.aux \
tests/enc-p.bbl tests/enc-ep.bbl tests/enc-sp.bbl tests/enc-up.bbl
DISTCLEANFILES += ptests/xexampl.aux ptests/xexampl.bbl ptests/xexampl.blg \
- ptests/xenc*.*
+ ptests/xenc*.* ptests/fn*.*
## ptexdir/pbibtex-mem.test
EXTRA_DIST += tests/memdata1.bst tests/memdata2.bst tests/memdata3.bst
DISTCLEANFILES += ptests/memtest.bib ptests/memtest?.*
diff --git a/Build/source/texk/web2c/ptexdir/wcfname.test b/Build/source/texk/web2c/ptexdir/wcfname.test
index 5c0ac034615..b1f5ebd53bf 100755
--- a/Build/source/texk/web2c/ptexdir/wcfname.test
+++ b/Build/source/texk/web2c/ptexdir/wcfname.test
@@ -20,7 +20,7 @@ for doc in fnさざ波-$fenc; do
echo '>>> Document:'$doc ' File Encoding:'$fenc ' Internal Encoding:'$ienc
./ptex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape $doc.tex >ptests/$doc-$ienc-term.log || $rc=1
mv $doc-$ienc.txt $doc-$ienc.log $doc-tmp.tex ptests/
- diff ptests/$doc-$ienc.txt $srcdir/tests/fn-utf8.txt || $rc=2
+ diff ptests/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || $rc=2
done
done
diff --git a/Build/source/texk/web2c/tests/fn¢£¥µÆØß-utf8.tex b/Build/source/texk/web2c/tests/fn¢£¥µÆØß-utf8.tex
new file mode 100644
index 00000000000..6df48580a36
--- /dev/null
+++ b/Build/source/texk/web2c/tests/fn¢£¥µÆØß-utf8.tex
@@ -0,0 +1,23 @@
+% fn¢£¥µÆØß-utf8.tex
+% UTF-8 encoding, including Latin-1 characters
+\catcode`\{=1
+\catcode`\}=2
+
+\immediate\write16{JOB[\jobname] :: We are in fn¢£¥µÆØß-utf8.tex}
+
+\immediate\openout0=\jobname.txt
+\immediate\write0{abc αβγ абв あア※¥ 天地人}
+\immediate\closeout0
+
+\immediate\openout1=fn¢£¥µÆØß-utf8-tmp.tex
+\immediate\write1{\relax}
+\immediate\closeout1
+
+% current directory
+\input "|cat fn¢£¥µÆØß-utf8-tmp.tex"
+\input fn¢£¥µÆØß-utf8-tmp.tex
+
+% vir kpathsearch
+\input fn±×÷§¶-utf8.tex
+
+\relax\end
diff --git a/Build/source/texk/web2c/uptexdir/am/uptex.am b/Build/source/texk/web2c/uptexdir/am/uptex.am
index 89d8695edb1..f60bdf48a7e 100644
--- a/Build/source/texk/web2c/uptexdir/am/uptex.am
+++ b/Build/source/texk/web2c/uptexdir/am/uptex.am
@@ -167,7 +167,7 @@ EXTRA_DIST += \
# upTeX Tests
uptex_tests = uptexdir/uptriptest.test uptexdir/upver.test uptexdir/upkcat.test uptexdir/wcfname.test
uptexdir/uptriptest.log: uptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
-uptexdir/upver.log uptexdir/upkcat.log: uptex$(EXEEXT)
+uptexdir/upver.log uptexdir/upkcat.log uptexdir/wcfname.log: uptex$(EXEEXT)
upweb_tests = \
uptexdir/upbibtex.test \
uptexdir/updvitype.test \
@@ -214,7 +214,7 @@ DISTCLEANFILES += uptests/nissya_bib.*
## uptexdir/upbibtex.test
EXTRA_DIST += tests/enc-u.bbl tests/enc-eu.bbl tests/enc-su.bbl tests/enc-uu.bbl
DISTCLEANFILES += uptests/xexampl.aux uptests/xexampl.bbl uptests/xexampl.blg \
- uptests/xenc*.*
+ uptests/xenc*.* uptests/fn*.*
## uptexdir/upbibtex-mem.test
DISTCLEANFILES += uptests/memtest.bib uptests/memtest?.*
## uptexdir/updvitype.test
diff --git a/Build/source/texk/web2c/uptexdir/wcfname.test b/Build/source/texk/web2c/uptexdir/wcfname.test
index 9813b8a32e2..8fde8584b12 100755
--- a/Build/source/texk/web2c/uptexdir/wcfname.test
+++ b/Build/source/texk/web2c/uptexdir/wcfname.test
@@ -31,7 +31,7 @@ for doc in fnさざ波-$fenc; do
echo '>>> Document:'$doc ' File Encoding:'$fenc ' Internal Encoding:'$ienc
./uptex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape $doc.tex >uptests/$doc-$ienc-term.log || $rc=1
mv $doc-$ienc.txt $doc-$ienc.log $doc-tmp.tex uptests/
- diff uptests/$doc-$ienc.txt $srcdir/tests/fn-utf8.txt || $rc=2
+ diff uptests/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || $rc=2
done
done
diff --git a/Build/source/texk/web2c/xetexdir/am/xetex.am b/Build/source/texk/web2c/xetexdir/am/xetex.am
index 6a1b76b9672..dec7b04e9b4 100644
--- a/Build/source/texk/web2c/xetexdir/am/xetex.am
+++ b/Build/source/texk/web2c/xetexdir/am/xetex.am
@@ -204,8 +204,10 @@ EXTRA_DIST += \
xetex_tests = \
xetexdir/xetex-filedump.test \
xetexdir/xetex-bug73.test \
- xetexdir/xetex.test
-xetexdir/xetex-filedump.log xetexdir/xetex-bug73.log xetexdir/xetex.log: xetex$(EXEEXT)
+ xetexdir/xetex.test \
+ xetexdir/wcfname.test
+xetexdir/xetex-filedump.log xetexdir/xetex-bug73.log xetexdir/xetex.log \
+ xetexdir/wcfname.log: xetex$(EXEEXT)
EXTRA_DIST += $(xetex_tests)
@@ -221,4 +223,7 @@ DISTCLEANFILES += bug73.fmt bug73.log bug73.out bug73.tex
EXTRA_DIST += xetexdir/tests/filedump.log xetexdir/tests/filedump.tex
DISTCLEANFILES += filedump.log filedump.out filedump.tex
+## wcfname.test
+DISTCLEANFILES += xetests/fn*.*
+
# (end of xetex.am)
diff --git a/Build/source/texk/web2c/xetexdir/wcfname.test b/Build/source/texk/web2c/xetexdir/wcfname.test
new file mode 100755
index 00000000000..9f8f306c45a
--- /dev/null
+++ b/Build/source/texk/web2c/xetexdir/wcfname.test
@@ -0,0 +1,32 @@
+#! /bin/sh -vx
+#
+# Copyright 2022 Japanese TeX Development Community <issue@texjp.org>
+# You may freely use, modify and/or distribute this file.
+
+test -d xetests || mkdir -p xetests
+rm -f xetests/fn*.log xetests/fn*.txt xetests/fn*.tex
+
+rc=0
+
+TEXMFCNF=$srcdir/../kpathsea
+TEXINPUTS=$srcdir/tests:.
+export TEXMFCNF TEXINPUTS
+
+if [ "$COMSPEC" != "" ]; then
+ echo "*** We guess OS is Windows."
+ command_line_encoding=utf8
+ export command_line_encoding
+fi
+
+fenc="utf8"
+for doc in fn¢£¥µÆØß-$fenc fnさざ波-$fenc; do
+
+ echo '>>> Document:'$doc ' File Encoding:'$fenc
+ ./xetex -ini -interaction nonstopmode -jobname=$doc --shell-escape $doc.tex >xetests/$doc-term.log || $rc=1
+ mv $doc.txt $doc.log $doc-tmp.tex xetests/
+ diff xetests/$doc.txt $srcdir/tests/fn-utf8.txt || $rc=2
+
+done
+
+
+exit $rc