latin: consistent morse character translation from ascii
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 3 Mar 2015 18:01:49 +0000 (19:01 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 9 Jun 2015 03:43:42 +0000 (05:43 +0200)
Improve code maintainability by encoding with ASCII dash - and period .
and converting to visually preferred hyphen and hyphenation point.

writing-latn.inc.pl

index d808e0d8fec82914095778f69af06e17e0f5300f..4c31b67aa178268fe97b7fc79af66d964144c7c5 100644 (file)
@@ -4,6 +4,8 @@ latn     => [qw{ a b c d e f g h i j k l m n o p q r s t u v w x y z }],
 latfsuet => [qw{ a b c d e f g h i j k l m n o p q r ſ s t u v w x y z }],
 ase      => [qw{ a b c d e f g h i j k l m n o p q r s t u v w x y z }],
 brai     => [qw{ ⠁ ⠃ ⠉ ⠙ ⠑ ⠋ ⠛ ⠓ ⠊ ⠚ ⠅ ⠇ ⠍ ⠝ ⠕ ⠏ ⠟ ⠗ ⠎ ⠞ ⠥ ⠧ ⠺ ⠭ ⠽ ⠵ }],
-morse    => [qw{ ‧‑ ‑‧‧‧ ‑‧‑‧ ‑‧‧ ‧ ‧‧‐‧ ‐‐‧ ‧‧‧‧ ‧‧ ‧‐‐‐ ‐‧‐ ‧‐‧‧ ‐‐
-                 ‐‧ ‐‐‐ ‧‐‐‧ ‐‐‧‐ ‧‐‧ ‧‧‧ ‐ ‧‧‐ ‧‧‧‐ ‧‐‐ ‐‧‧‐ ‐‧‐‐ ‐‐‧‧ }],
+morse    => [map {tr/.-/‧‑/r} qw{
+               .- -... -.-. -.. . ..-. --. .... .. .--- -.- .-.. --
+               -. --- .--. --.- .-. ... - ..- ...- .-- -..- -.-- --..
+            }],
 );