aboutsummaryrefslogtreecommitdiff
path: root/emojitrans2.pl
diff options
context:
space:
mode:
authorMark Shoulson <mark@kli.org>2016-12-02 09:23:00 -0500
committerMark Shoulson <mark@kli.org>2017-02-19 19:39:01 -0500
commite98c955c2c375377f5af889f04dbd4bee947e8a1 (patch)
tree94bf5058325068acabb2bc4c650e97e442abfd87 /emojitrans2.pl
parentAdd more subscripts, including Greek (diff)
downloaddotXCompose-e98c955c2c375377f5af889f04dbd4bee947e8a1.tar.gz
dotXCompose-e98c955c2c375377f5af889f04dbd4bee947e8a1.tar.bz2
dotXCompose-e98c955c2c375377f5af889f04dbd4bee947e8a1.zip
Added more emoji, including big lists of (raw) new characters from other blocks and unicode 9.0
Also added makefile
Diffstat (limited to 'emojitrans2.pl')
-rwxr-xr-xemojitrans2.pl11
1 files changed, 10 insertions, 1 deletions
diff --git a/emojitrans2.pl b/emojitrans2.pl
index 3b98ad2..b18fb3a 100755
--- a/emojitrans2.pl
+++ b/emojitrans2.pl
@@ -1,9 +1,12 @@
#!/usr/bin/perl -p
+use feature 'unicode_strings';
+use utf8;
BEGIN { binmode(STDOUT, ":utf8");
binmode(STDIN, ":utf8");
%specials = ('%' => 'percent',
'-' => 'minus',
+ '_' => 'underscore',
'>' => 'greater',
'<' => 'less',
',' => 'comma',
@@ -16,17 +19,23 @@ BEGIN { binmode(STDOUT, ":utf8");
'#' => 'numbersign',
'@' => 'at',
'|' => 'bar',
+ '`' => 'grave',
'~' => 'asciitilde',
'^' => 'asciicircum',
'(' => 'parenleft',
')' => 'parenright',
'[' => 'bracketleft',
']' => 'bracketright',
+ '{' => 'braceleft',
+ '}' => 'braceright',
"'" => 'apostrophe',
'\\' => 'backslash',
':' => 'colon',
';' => 'semicolon',
+ '=' => 'equal',
' ' => 'space',
+ '*' => 'asterisk',
+ '♫' => 'Multi_key',
);
sub splitup {
@@ -49,7 +58,7 @@ sub splitup {
unless (/^#/) {
my $hold=$_;
s/<MM>/<Multi_key> <Multi_key>/;
- s({([][[:alnum:] _+:;%@><,.^\$+#()?!/|'\\~-]+)})(splitup($1))e;
+ s({([][[:alnum:] _+:;%@>=`<,.^\$+#()?!/|'\\~*{}♫-]+)})(splitup($1))e;
if (length($1) > 7) {
$_=$hold;
s/^<MM>/### <MM>/;