From 18cb08b3937f1684790f94469a575b69e19dd116 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 6 Jul 2010 12:51:44 +0200 Subject: Fix simplify ’ char using s// (using tr// expands it thrice). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- localmarkdown2sms | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'localmarkdown2sms') diff --git a/localmarkdown2sms b/localmarkdown2sms index 2de3476..fc771f6 100755 --- a/localmarkdown2sms +++ b/localmarkdown2sms @@ -182,7 +182,7 @@ sub tidymsg { $msg =~ s/(\S)\n([^\n])/$1 $2/g; # convert newline to space $msg =~ s/\h*$//g; # strip all trailing spaces $msg =~ s/^\s*(\w*?.*?)\s*$/$1/s; # strip surrounding space - $msg =~ tr/’/'/; #'simplify non-GSM chars + $msg =~ s/’/'/g; #'simplify non-GSM chars $msg =~ s/…/.../g; # simplify ellipsis $msg =~ s/\.\.+/.../g; # multiple dots → psudo-ellipsis return $msg; -- cgit v1.2.3