summaryrefslogtreecommitdiff
path: root/Build/source/texk/bibtex-x/bibtex.c
diff options
context:
space:
mode:
authorTakuji Tanaka <ttk@t-lab.opal.ne.jp>2021-08-14 14:03:26 +0000
committerTakuji Tanaka <ttk@t-lab.opal.ne.jp>2021-08-14 14:03:26 +0000
commitb8e70e2b6a8f4847f511bfb08bfa92d254c8f112 (patch)
treec87f2085d3da0b27684f375c8c24a23dc08da7b3 /Build/source/texk/bibtex-x/bibtex.c
parent3466839487a4ee233b88c2b455029b66c4c0915d (diff)
bibtexu: clean up usage of ICU functions
git-svn-id: svn://tug.org/texlive/trunk@60239 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/bibtex-x/bibtex.c')
-rw-r--r--Build/source/texk/bibtex-x/bibtex.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/Build/source/texk/bibtex-x/bibtex.c b/Build/source/texk/bibtex-x/bibtex.c
index eeed86aa6af..ed784b62b1f 100644
--- a/Build/source/texk/bibtex-x/bibtex.c
+++ b/Build/source/texk/bibtex-x/bibtex.c
@@ -282,9 +282,19 @@ BEGIN
{
UVersionInfo icuVersion;
char icu_version[U_MAX_VERSION_STRING_LENGTH] = "";
+ UErrorCode err1 = U_ZERO_ERROR;
u_getVersion(icuVersion);
u_versionToString(icuVersion, icu_version);
FPRINTF (log_file, "Compiled with: ICU version %s\n", icu_version);
+
+ if (Flag_location)
+ u_coll = ucol_open(Str_location, &err1);
+ else
+ u_coll = ucol_open(NULL, &err1);
+ if (!U_SUCCESS(err1)) {
+ FPRINTF (log_file, "Error in opening ICU collator.\n");
+ exit(FATAL_EXIT_STATUS);
+ }
}
#endif
FPRINTF (log_file, "\n");
@@ -379,6 +389,9 @@ Aux_Done_Label:
END
get_bst_command_and_process ();
END
+#ifdef UTF_8
+ ucol_close(u_coll);
+#endif
Bst_Done_Label:
a_close (bst_file);
No_Bst_File_Label: