summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/tests
diff options
context:
space:
mode:
authorTakuji Tanaka <ttk@t-lab.opal.ne.jp>2022-06-12 08:18:23 +0000
committerTakuji Tanaka <ttk@t-lab.opal.ne.jp>2022-06-12 08:18:23 +0000
commitc6f5af13c21701cf913804b954c734f20b2748ce (patch)
tree0c86b4de09354f4ef0cdc1a5f28150328dbf8790 /Build/source/texk/web2c/tests
parentab299733b38a3196a337723507b86a22a19589f3 (diff)
(e)(u)pTeX, (u)pBibTeX: support guessing input file encodings
git-svn-id: svn://tug.org/texlive/trunk@63557 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/tests')
-rw-r--r--Build/source/texk/web2c/tests/enc-amb0.bib13
-rw-r--r--Build/source/texk/web2c/tests/enc-amb1.bib5
-rw-r--r--Build/source/texk/web2c/tests/enc-amb2.bib13
-rw-r--r--Build/source/texk/web2c/tests/enc-asc.bib1
-rw-r--r--Build/source/texk/web2c/tests/enc-e.aux3
-rw-r--r--Build/source/texk/web2c/tests/enc-ep.bbl53
-rw-r--r--Build/source/texk/web2c/tests/enc-eu.bbl54
-rw-r--r--Build/source/texk/web2c/tests/enc-euc.bib5
-rw-r--r--Build/source/texk/web2c/tests/enc-jis.bib5
-rw-r--r--Build/source/texk/web2c/tests/enc-p.bbl64
-rw-r--r--Build/source/texk/web2c/tests/enc-s.aux3
-rw-r--r--Build/source/texk/web2c/tests/enc-sjis.bib5
-rw-r--r--Build/source/texk/web2c/tests/enc-sp.bbl43
-rw-r--r--Build/source/texk/web2c/tests/enc-su.bblbin0 -> 931 bytes
-rw-r--r--Build/source/texk/web2c/tests/enc-u.bbl66
-rw-r--r--Build/source/texk/web2c/tests/enc-utf8.bib5
-rw-r--r--Build/source/texk/web2c/tests/enc-utf8a.bib6
-rw-r--r--Build/source/texk/web2c/tests/enc-utf8b.bib7
-rw-r--r--Build/source/texk/web2c/tests/enc.aux3
-rw-r--r--Build/source/texk/web2c/tests/testfield.bst38
20 files changed, 392 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/tests/enc-amb0.bib b/Build/source/texk/web2c/tests/enc-amb0.bib
new file mode 100644
index 00000000000..571d35b0ed3
--- /dev/null
+++ b/Build/source/texk/web2c/tests/enc-amb0.bib
@@ -0,0 +1,13 @@
+% ambiguous: UTF-8 or EUC-JP
+@Type{ambiguos-a001, field = {C2Ax: ¢£¥§¨¬}, }
+@Type{ambiguos-a002, field = {C2Bx: °±¶÷}, }
+@Type{ambiguos-a005, field = {CEAx: ΡΣΤΥΦΧΨΩ}, }
+@Type{ambiguos-a006, field = {CEBx: αβγδεζηθικλμνξο}, }
+@Type{ambiguos-a007, field = {D0Ax: СТУФХЦЧШЩЪЫЬЭЮЯ}, }
+@Type{ambiguos-a008, field = {D0Bx: абвгдежзийклмноп}, }
+@Type{ambiguos-a009, field = {佳人 大声 亡失 対価 幼女 帰任 信仰 伴侶 山岳 年俸 平常 延伸 鷲鷹}, }
+@Type{ambiguos-a011, field = {F0A3B3BE: 𣳾}, }
+@Type{ambiguos-a012, field = {F0A5B6A1: 𥶡}, }
+@Type{ambiguos-a013, field = {F0A1B6B7: 𡶷}, }
+@Type{ambiguos-a020, field = {ξΩ ΥΦ ®ã ŷЧ Сб άå º°}, }
+
diff --git a/Build/source/texk/web2c/tests/enc-amb1.bib b/Build/source/texk/web2c/tests/enc-amb1.bib
new file mode 100644
index 00000000000..07f09b456f3
--- /dev/null
+++ b/Build/source/texk/web2c/tests/enc-amb1.bib
@@ -0,0 +1,5 @@
+% ambiguous: UTF-8 or Shift_JIS
+@Type{ambiguos-a050, field = {係q体y}, }
+@Type{ambiguos-a051, field = {語①誚②}, }
+@Type{ambiguos-a052, field = {思想 打球 明文 垂直 怜悧}, }
+
diff --git a/Build/source/texk/web2c/tests/enc-amb2.bib b/Build/source/texk/web2c/tests/enc-amb2.bib
new file mode 100644
index 00000000000..b6b8e643fe0
--- /dev/null
+++ b/Build/source/texk/web2c/tests/enc-amb2.bib
@@ -0,0 +1,13 @@
+% ambiguous: EUC-JP or Shift_JIS
+@Type{ambiguos-a100, field = {E0Ax: }, }
+@Type{ambiguos-a101, field = {E2Ax: }, }
+@Type{ambiguos-a102, field = {E4Ax: }, }
+@Type{ambiguos-a103, field = {E6Ax: }, }
+@Type{ambiguos-a104, field = {E8Ax: }, }
+@Type{ambiguos-a105, field = {EAAx: }, }
+@Type{ambiguos-a106, field = {coffee: }, }
+@Type{ambiguos-a107, field = {amber: }, }
+@Type{ambiguos-a108, field = {dotage: }, }
+@Type{ambiguos-a109, field = {konjak: }, }
+@Type{ambiguos-a110, field = {rampant: }, }
+
diff --git a/Build/source/texk/web2c/tests/enc-asc.bib b/Build/source/texk/web2c/tests/enc-asc.bib
new file mode 100644
index 00000000000..1cc32d2a78f
--- /dev/null
+++ b/Build/source/texk/web2c/tests/enc-asc.bib
@@ -0,0 +1 @@
+@Type{ascii-a001, field = {ABC xyz}, }
diff --git a/Build/source/texk/web2c/tests/enc-e.aux b/Build/source/texk/web2c/tests/enc-e.aux
new file mode 100644
index 00000000000..1c79745a17d
--- /dev/null
+++ b/Build/source/texk/web2c/tests/enc-e.aux
@@ -0,0 +1,3 @@
+\citation{*}
+\bibstyle{testfield}
+\bibdata{enc-asc,enc-jis,enc-sjis,enc-euc,enc-utf8,enc-utf8b,enc-amb0,enc-amb2}
diff --git a/Build/source/texk/web2c/tests/enc-ep.bbl b/Build/source/texk/web2c/tests/enc-ep.bbl
new file mode 100644
index 00000000000..f297f089e2b
--- /dev/null
+++ b/Build/source/texk/web2c/tests/enc-ep.bbl
@@ -0,0 +1,53 @@
+\section*{Test result}
+\begin{itemize}
+\item ABC xyz
+\item ABC xyz
+\item ABC xyz
+\item ABC xyz
+\item ABC xyz
+\item ABC xyz
+\item C2Ax:
+\item C2Ax: ¢£¥§¨¬
+\item C2Bx: °±¶÷
+\item CEAx: ΡΣΤΥΦΧΨΩ
+\item CEBx: ¦æĦŦƦǦȦɦʦ˦̦ͦΦ
+\item CEBx: αβγδεζηθικλμνξο
+\item D0Ax: СТУФХЦЧШЩЪЫЬЭЮЯ
+\item D0Bx: ѧҧӧԧէ֧ا٧ڧۧܧݧާߧ
+\item D0Bx: абвгдежзийклмноп
+\item E0Ax:
+\item E2Ax:
+\item E4Ax:
+\item E6Ax:
+\item E8Ax:
+\item EAAx:
+\item F0A1B6B7: 𡶷
+\item F0A3B3BE: 𣳾
+\item F0A5B6A1: 𥶡
+\item amber:
+\item coffee:
+\item dotage:
+\item konjak:
+\item rampant:
+\item
+\item
+\item
+\item
+\item ֦צ
+\item ֦צ
+\item ֦צ
+\item ֦צ
+\item
+\item
+\item
+\item
+\item 󻰻͸
+\item 󻰻͸
+\item 󻰻͸
+\item 󻰻͸
+\item ¿ ˴ в Ľ Ǥ ȼη ǯ ʿ 俭
+\item ξΩ ΥΦ ®ã ŷЧ Сб άå º°
+\item
+ 佳人 大声 亡失 対価 幼女 帰任 信仰 伴侶 山岳 年俸 平常 延伸 鷲鷹
+\end{itemize}
+\endinput
diff --git a/Build/source/texk/web2c/tests/enc-eu.bbl b/Build/source/texk/web2c/tests/enc-eu.bbl
new file mode 100644
index 00000000000..68a89dd8ff9
--- /dev/null
+++ b/Build/source/texk/web2c/tests/enc-eu.bbl
@@ -0,0 +1,54 @@
+\section*{Test result}
+\begin{itemize}
+\item ABC xyz
+\item ABC xyz
+\item ABC xyz
+\item ABC xyz
+\item ABC xyz
+\item ABC xyz
+\item C2Ax:
+\item C2Ax: ¢£¥§¨¬
+\item C2Bx: °±¶÷
+\item CEAx: ΡΣΤΥΦΧΨΩ
+\item CEBx: ¦æĦŦƦǦȦɦʦ˦̦ͦΦ
+\item CEBx: αβγδεζηθικλμνξο
+\item D0Ax: СТУФХЦЧШЩЪЫЬЭЮЯ
+\item D0Bx: ѧҧӧԧէ֧ا٧ڧۧܧݧާߧ
+\item D0Bx: абвгдежзийклмноп
+\item E0Ax:
+\item E2Ax:
+\item E4Ax:
+\item E6Ax:
+\item E8Ax:
+\item EAAx:
+\item F0A1B6B7: 𡶷
+\item F0A3B3BE: 𣳾
+\item F0A5B6A1: 𥶡
+\item amber:
+\item coffee:
+\item dotage:
+\item konjak:
+\item rampant:
+\item ֦צ
+\item ֦צ
+\item ֦צ
+\item ֦צ
+\item
+\item
+\item
+\item
+\item
+\item
+\item
+\item
+\item 󻰻͸
+\item 󻰻͸
+\item 󻰻͸
+\item 󻰻͸
+\item ξΩ ΥΦ ®ã ŷЧ Сб άå º°
+\item
+ ¿ ˴ в Ľ Ǥ ȼη ǯ ʿ 俭
+\item
+ 佳人 大声 亡失 対価 幼女 帰任 信仰 伴侶 山岳 年俸 平常 延伸 鷲鷹
+\end{itemize}
+\endinput
diff --git a/Build/source/texk/web2c/tests/enc-euc.bib b/Build/source/texk/web2c/tests/enc-euc.bib
new file mode 100644
index 00000000000..e443b6f1c36
--- /dev/null
+++ b/Build/source/texk/web2c/tests/enc-euc.bib
@@ -0,0 +1,5 @@
+@Type{ascii-e001, field = {ABC xyz}, }
+@Type{greek-e001, field = { ֦צ}, }
+@Type{cyrillic-e001, field = { }, }
+@Type{kana-e001, field = {}, }
+@Type{hanzi-e001, field = {󻰻͸}, }
diff --git a/Build/source/texk/web2c/tests/enc-jis.bib b/Build/source/texk/web2c/tests/enc-jis.bib
new file mode 100644
index 00000000000..655bc894875
--- /dev/null
+++ b/Build/source/texk/web2c/tests/enc-jis.bib
@@ -0,0 +1,5 @@
+@Type{ascii-j001, field = {ABC xyz}, }
+@Type{greek-j001, field = {$B&!&"&#(B $B&V&W&X(B}, }
+@Type{cyrillic-j001, field = {$B'!'"'#(B $B'o'p'q(B}, }
+@Type{kana-j001, field = {$B$"$$$&$($*(B}, }
+@Type{hanzi-j001, field = {$B0lFs;0;M8^(B}, }
diff --git a/Build/source/texk/web2c/tests/enc-p.bbl b/Build/source/texk/web2c/tests/enc-p.bbl
new file mode 100644
index 00000000000..d8cec92c192
--- /dev/null
+++ b/Build/source/texk/web2c/tests/enc-p.bbl
@@ -0,0 +1,64 @@
+\section*{Test result}
+\begin{itemize}
+\item ABC xyz
+\item ABC xyz
+\item ABC xyz
+\item ABC xyz
+\item ABC xyz
+\item ABC xyz
+\item ABC xyz
+\item C2Ax: ¢£¥§¨¬
+\item C2Ax: ¢£¥§¨¬
+\item C2Bx: °±¶÷
+\item CEAx: ΡΣΤΥΦΧΨΩ
+\item CEBx: αβγδεζηθικλμνξο
+\item CEBx: αβγδεζηθικλμνξο
+\item D0Ax: СТУФХЦЧШЩЪЫЬЭЮЯ
+\item D0Bx: абвгдежзийклмноп
+\item D0Bx: абвгдежзийклмноп
+\item E0Ax:
+ ^^e0^^a1^^e0^^a2^^e0^^a3^^e0^^a4^^e0^^a5^^e0^^a6^^e0^^a7^^e0^^a8^^e0^^a9^^e0^^aa^^e0^^ab^^e0^^ac^^e0^^ad^^e0^^ae^^e0^^af
+\item E2Ax:
+ ^^e2^^a1^^e2^^a2^^e2^^a3^^e2^^a4^^e2^^a5^^e2^^a6^^e2^^a7^^e2^^a8^^e2^^a9^^e2^^aa^^e2^^ab^^e2^^ac^^e2^^ad^^e2^^ae^^e2^^af
+\item E4Ax:
+ ^^e4^^a1^^e4^^a2^^e4^^a3^^e4^^a4^^e4^^a5^^e4^^a6^^e4^^a7^^e4^^a8^^e4^^a9^^e4^^aa^^e4^^ab^^e4^^ac^^e4^^ad^^e4^^ae^^e4^^af
+\item E6Ax:
+ ^^e6^^a1^^e6^^a2^^e6^^a3^^e6^^a4^^e6^^a5^^e6^^a6^^e6^^a7^^e6^^a8^^e6^^a9^^e6^^aa^^e6^^ab^^e6^^ac^^e6^^ad^^e6^^ae^^e6^^af
+\item E8Ax:
+ ^^e8^^a1^^e8^^a2^^e8^^a3^^e8^^a4^^e8^^a5^^e8^^a6^^e8^^a7^^e8^^a8^^e8^^a9^^e8^^aa^^e8^^ab^^e8^^ac^^e8^^ad^^e8^^ae^^e8^^af
+\item EAAx: ^^ea^^a1^^ea^^a2^^ea^^a3^^ea^^a4
+\item F0A1B6B7: ^^f0^^a1^^b6^^b7
+\item F0A3B3BE: ^^f0^^a3^^b3^^be
+\item F0A5B6A1: ^^f0^^a5^^b6^^a1
+\item amber: ^^e0^^e8^^e0^^e1 ^^e0^^e6^^e0^^df
+\item coffee: ^^e0^^dd^^e0^^ea ^^e0^^db^^e0^^e8
+\item dotage: ^^e6^^ce^^e2^^f1 ^^e3^^cc^^e1^^ef
+\item konjak: ^^e8^^e7^^e8^^ea ^^e4^^e5^^e4^^e8
+\item rampant: ^^e0^^cb^^e0^^d5 ^^e0^^c9^^e0^^d3
+\item あいうえお
+\item あいうえお
+\item あいうえお
+\item あいうえお
+\item ΑΒΓ χψω
+\item ΑΒΓ χψω
+\item ΑΒΓ χψω
+\item ΑΒΓ χψω
+\item ξΩ ΥΦ ^^c2^^ae^^c3^^a3 ^^c5^^b7Ч Сб ^^ce^^ac^^c3^^a5 ^^c2^^ba°
+\item АБВ эюя
+\item АБВ эюя
+\item АБВ эюя
+\item АБВ эюя
+\item 一二三四五
+\item 一二三四五
+\item 一二三四五
+\item 一二三四五
+\item 佳人 大声 亡失 対価 幼女 帰任 信仰 伴侶 山岳 年俸 平常 延伸 鷲鷹
+\item 佳人 大声 亡失 対価 幼女 帰任 信仰 伴侶 山岳 年俸 平常 延伸 鷲鷹
+\item 係q体y
+\item 係q体y
+\item 語^^e2^^91^^a0誚^^e2^^91^^a1
+\item 語^^e2^^91^^a0誚^^e2^^91^^a1
+\item 思想 打球 明文 垂直 怜悧
+\item 思想 打球 明文 垂直 怜悧
+\end{itemize}
+\endinput
diff --git a/Build/source/texk/web2c/tests/enc-s.aux b/Build/source/texk/web2c/tests/enc-s.aux
new file mode 100644
index 00000000000..d14291f20f2
--- /dev/null
+++ b/Build/source/texk/web2c/tests/enc-s.aux
@@ -0,0 +1,3 @@
+\citation{*}
+\bibstyle{testfield}
+\bibdata{enc-asc,enc-jis,enc-sjis,enc-euc,enc-utf8,enc-utf8a,enc-amb1,enc-amb2}
diff --git a/Build/source/texk/web2c/tests/enc-sjis.bib b/Build/source/texk/web2c/tests/enc-sjis.bib
new file mode 100644
index 00000000000..88893cb2fa8
--- /dev/null
+++ b/Build/source/texk/web2c/tests/enc-sjis.bib
@@ -0,0 +1,5 @@
+@Type{ascii-s001, field = {ABC xyz}, }
+@Type{greek-s001, field = { ԃՃ}, }
+@Type{cyrillic-s001, field = {@AB }, }
+@Type{kana-s001, field = {}, }
+@Type{hanzi-s001, field = {Ol}, }
diff --git a/Build/source/texk/web2c/tests/enc-sp.bbl b/Build/source/texk/web2c/tests/enc-sp.bbl
new file mode 100644
index 00000000000..1512fe324a2
--- /dev/null
+++ b/Build/source/texk/web2c/tests/enc-sp.bbl
@@ -0,0 +1,43 @@
+\section*{Test result}
+\begin{itemize}
+\item ABC xyz
+\item ABC xyz
+\item ABC xyz
+\item ABC xyz
+\item ABC xyz
+\item ABC xyz
+\item E0Ax:
+\item E2Ax:
+\item E4Ax:
+\item E6Ax:
+\item E8Ax:
+\item EAAx:
+\item amber:
+\item coffee:
+\item dotage:
+\item konjak:
+\item rampant:
+\item
+\item
+\item
+\item
+\item ԃՃ
+\item ԃՃ
+\item ԃՃ
+\item ԃՃ
+\item @AB
+\item @AB
+\item @AB
+\item @AB
+\item Ol
+\item Ol
+\item Ol
+\item Ol
+\item Wqy
+\item ^^e2^^91^^a0v^^e2^^91^^a1
+\item vz ŋ 圤
+\item 係q体y
+\item 思想 打球 明文 垂直 怜悧
+\item 語①誚②
+\end{itemize}
+\endinput
diff --git a/Build/source/texk/web2c/tests/enc-su.bbl b/Build/source/texk/web2c/tests/enc-su.bbl
new file mode 100644
index 00000000000..a3cfb67084d
--- /dev/null
+++ b/Build/source/texk/web2c/tests/enc-su.bbl
Binary files differ
diff --git a/Build/source/texk/web2c/tests/enc-u.bbl b/Build/source/texk/web2c/tests/enc-u.bbl
new file mode 100644
index 00000000000..278cecf597d
--- /dev/null
+++ b/Build/source/texk/web2c/tests/enc-u.bbl
@@ -0,0 +1,66 @@
+\section*{Test result}
+\begin{itemize}
+\item ABC xyz
+\item ABC xyz
+\item ABC xyz
+\item ABC xyz
+\item ABC xyz
+\item ABC xyz
+\item ABC xyz
+\item C2Ax: ¢£¥§¨¬
+\item C2Ax: ¢£¥§¨¬
+\item C2Bx: °±¶÷
+\item CEAx: ΡΣΤΥΦΧΨΩ
+\item CEBx: αβγδεζηθικλμνξο
+\item CEBx: αβγδεζηθικλμνξο
+\item D0Ax: СТУФХЦЧШЩЪЫЬЭЮЯ
+\item D0Bx: абвгдежзийклмноп
+\item D0Bx: абвгдежзийклмноп
+\item E0Ax:
+ ^^e0^^a1^^e0^^a2^^e0^^a3^^e0^^a4^^e0^^a5^^e0^^a6^^e0^^a7^^e0^^a8^^e0^^a9^^e0^^aa^^e0^^ab^^e0^^ac^^e0^^ad^^e0^^ae^^e0^^af
+\item E2Ax:
+ ^^e2^^a1^^e2^^a2^^e2^^a3^^e2^^a4^^e2^^a5^^e2^^a6^^e2^^a7^^e2^^a8^^e2^^a9^^e2^^aa^^e2^^ab^^e2^^ac^^e2^^ad^^e2^^ae^^e2^^af
+\item E4Ax:
+ ^^e4^^a1^^e4^^a2^^e4^^a3^^e4^^a4^^e4^^a5^^e4^^a6^^e4^^a7^^e4^^a8^^e4^^a9^^e4^^aa^^e4^^ab^^e4^^ac^^e4^^ad^^e4^^ae^^e4^^af
+\item E6Ax:
+ ^^e6^^a1^^e6^^a2^^e6^^a3^^e6^^a4^^e6^^a5^^e6^^a6^^e6^^a7^^e6^^a8^^e6^^a9^^e6^^aa^^e6^^ab^^e6^^ac^^e6^^ad^^e6^^ae^^e6^^af
+\item E8Ax:
+ ^^e8^^a1^^e8^^a2^^e8^^a3^^e8^^a4^^e8^^a5^^e8^^a6^^e8^^a7^^e8^^a8^^e8^^a9^^e8^^aa^^e8^^ab^^e8^^ac^^e8^^ad^^e8^^ae^^e8^^af
+\item EAAx: ^^ea^^a1^^ea^^a2^^ea^^a3^^ea^^a4
+\item F0A1B6B7: 𡶷
+\item F0A3B3BE: 𣳾
+\item F0A5B6A1: 𥶡
+\item amber: ^^e0^^e8^^e0^^e1 ^^e0^^e6^^e0^^df
+\item coffee: ^^e0^^dd^^e0^^ea ^^e0^^db^^e0^^e8
+\item dotage: ^^e6^^ce^^e2^^f1 ^^e3^^cc^^e1^^ef
+\item konjak: ^^e8^^e7^^e8^^ea ^^e4^^e5^^e4^^e8
+\item rampant: ^^e0^^cb^^e0^^d5 ^^e0^^c9^^e0^^d3
+\item ΑΒΓ χψω
+\item ΑΒΓ χψω
+\item ΑΒΓ χψω
+\item ΑΒΓ χψω
+\item ξΩ ΥΦ ®ã ŷЧ Сб άå º°
+\item АБВ эюя
+\item АБВ эюя
+\item АБВ эюя
+\item АБВ эюя
+\item あいうえお
+\item あいうえお
+\item あいうえお
+\item あいうえお
+\item 一二三四五
+\item 一二三四五
+\item 一二三四五
+\item 一二三四五
+\item
+ 佳人 大声 亡失 対価 幼女 帰任 信仰 伴侶 山岳 年俸 平常 延伸 鷲鷹
+\item
+ 佳人 大声 亡失 対価 幼女 帰任 信仰 伴侶 山岳 年俸 平常 延伸 鷲鷹
+\item 係q体y
+\item 係q体y
+\item 思想 打球 明文 垂直 怜悧
+\item 思想 打球 明文 垂直 怜悧
+\item 語①誚②
+\item 語①誚②
+\end{itemize}
+\endinput
diff --git a/Build/source/texk/web2c/tests/enc-utf8.bib b/Build/source/texk/web2c/tests/enc-utf8.bib
new file mode 100644
index 00000000000..483754464cb
--- /dev/null
+++ b/Build/source/texk/web2c/tests/enc-utf8.bib
@@ -0,0 +1,5 @@
+@Type{ascii-u001, field = {ABC xyz}, }
+@Type{greek-u001, field = {ΑΒΓ χψω}, }
+@Type{cyrillic-u001, field = {АБВ эюя}, }
+@Type{kana-u001, field = {あいうえお}, }
+@Type{hanzi-u001, field = {一二三四五}, }
diff --git a/Build/source/texk/web2c/tests/enc-utf8a.bib b/Build/source/texk/web2c/tests/enc-utf8a.bib
new file mode 100644
index 00000000000..f51fb0b1d8e
--- /dev/null
+++ b/Build/source/texk/web2c/tests/enc-utf8a.bib
@@ -0,0 +1,6 @@
+% UTF-8 with BOM
+@Type{ascii-v001, field = {ABC xyz}, }
+@Type{ambiguos-v050, field = {係q体y}, }
+@Type{ambiguos-v051, field = {語①誚②}, }
+@Type{ambiguos-v052, field = {思想 打球 明文 垂直 怜悧}, }
+
diff --git a/Build/source/texk/web2c/tests/enc-utf8b.bib b/Build/source/texk/web2c/tests/enc-utf8b.bib
new file mode 100644
index 00000000000..d4dfddb0019
--- /dev/null
+++ b/Build/source/texk/web2c/tests/enc-utf8b.bib
@@ -0,0 +1,7 @@
+% UTF-8 with BOM
+@Type{ascii-v002, field = {ABC xyz}, }
+@Type{ambiguos-v003, field = {C2Ax: ¢£¥§¨¬}, }
+@Type{ambiguos-v006, field = {CEBx: αβγδεζηθικλμνξο}, }
+@Type{ambiguos-v008, field = {D0Bx: абвгдежзийклмноп}, }
+@Type{ambiguos-v009, field = {佳人 大声 亡失 対価 幼女 帰任 信仰 伴侶 山岳 年俸 平常 延伸 鷲鷹}, }
+
diff --git a/Build/source/texk/web2c/tests/enc.aux b/Build/source/texk/web2c/tests/enc.aux
new file mode 100644
index 00000000000..faf95546b76
--- /dev/null
+++ b/Build/source/texk/web2c/tests/enc.aux
@@ -0,0 +1,3 @@
+\citation{*}
+\bibstyle{testfield}
+\bibdata{enc-asc,enc-jis,enc-sjis,enc-euc,enc-utf8,enc-utf8a,enc-utf8b,enc-amb0,enc-amb1,enc-amb2}
diff --git a/Build/source/texk/web2c/tests/testfield.bst b/Build/source/texk/web2c/tests/testfield.bst
new file mode 100644
index 00000000000..862a4c59764
--- /dev/null
+++ b/Build/source/texk/web2c/tests/testfield.bst
@@ -0,0 +1,38 @@
+% BibTeX test style file
+% Copyright 2022 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
+% You may freely use, modify and/or distribute this file.
+
+ENTRY {field}{}{}
+
+FUNCTION {output_entry} {
+ "\item " field * write$
+ newline$
+}
+
+FUNCTION {type} {output_entry}
+
+READ
+
+FUNCTION {set_sort_key} {
+ field 'sort.key$ :=
+}
+
+ITERATE {set_sort_key}
+
+SORT
+
+FUNCTION {output_bgn} {
+ "\section*{Test result}" write$ newline$
+ "\begin{itemize}" write$ newline$
+}
+
+FUNCTION {output_end} {
+ "\end{itemize}" write$ newline$
+ "\endinput" write$ newline$
+}
+
+EXECUTE {output_bgn}
+
+ITERATE {call.type$}
+
+EXECUTE {output_end}