From 3a9121e3ccf68c1fbbe1c69aaded02af4476762b Mon Sep 17 00:00:00 2001 From: Audrey Tang Date: Tue, 2 Apr 2013 07:17:02 +0800 Subject: [PATCH] * Fix db2unicode.pl for cases where SQLite uses single quotes in dumps. Thx Yiliya and alex_hk90 for pointing it out --- db2unicode.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db2unicode.pl b/db2unicode.pl index 25c2da7..d4f7d74 100644 --- a/db2unicode.pl +++ b/db2unicode.pl @@ -21,8 +21,8 @@ open my $dump, '<:utf8', 'dict-revised.sqlite3.dump'; local $/; while (<$dump>) { - s< "\{\[ ($compat) \]\}" > - < '"'.($map{"x$1"} || $map{$1}) . '"' >egx; + s< (['"])\{\[ ($compat) \]\}\1 > + < $1.($map{"x$2"} || $map{$2}).$1 >egx; s< \{\[ ($re) \]\} >< $map{$1} >egx; print; }