From aba1f4ac960f0a323da4a377dfc4b675f466e801 Mon Sep 17 00:00:00 2001
From: Lars Helgeland <lhelgeland@yahoo.com>
Date: Fri, 16 Dec 2022 17:56:46 +0000
Subject: Fix handling of tbl separator characters

... that also happen to be Perl regex metacharacters.

Bug-Debian: https://bugs.debian.org/255132
Forwarded: no

Patch-Name: tbl-separator-characters.patch
---
 tblcvt/tblcvt.pl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tblcvt/tblcvt.pl b/tblcvt/tblcvt.pl
index 4bc0b6c..80509a8 100644
--- a/tblcvt/tblcvt.pl
+++ b/tblcvt/tblcvt.pl
@@ -782,7 +782,7 @@ my ($data);
 	# Split up data line, then keep reading input lines as long
 	# as the current data ends with "T{".
 
-	@d = split ($tab, $_);
+	@d = split (/\Q$tab\E/, $_);
 
 	# Prepend \& to any fields that begin with . followed by a number,
 	# to prevent a field like ".13" from being interpreted as a troff
@@ -818,7 +818,7 @@ my ($data);
 			$data =~ s/^(\.\d)/\\\&\1/;
 			$data =~ s/^(\s)/\\\&\1/;
 			push (@d, $data);
-			@d2 = split ($tab, $_);
+			@d2 = split (/\Q$tab\E/, $_);
 			shift (@d2);		# shift off the "T}"
 			# escape any fields after the T{...T} field that
 			# begin with dot or whitespace
