Emacs: Latin to Braille ⠎⠕⠍⠑ 🚀
Here's a command that convert Latin alphabet characters to Braille characters.
⠎⠕⠍⠑⠞⠓⠊⠝⠛ ⠊⠝ ⠞⠓⠑ ⠺⠁⠞⠑⠗
For JavaScript version, see Unicode: Braille ⠮
put this in your Emacs Init File:
(defun xah-convert-latin-to-braille (Begin End ToLatinQ) "Replace English letters to Unicode braille characters. When called interactively, work on current line or text selection. If `universal-argument' is called first, reverse direction. Note: original letter case are not preserved. B may become b. URL `http://xahlee.info/emacs/misc/elisp_latin_to_braille.html' Version: 2019-09-17 2021-07-31 2023-05-12" (interactive (if (use-region-p) (list (region-beginning) (region-end) current-prefix-arg ) (list (line-beginning-position) (line-end-position) current-prefix-arg ))) (let ( xtoBrailleMap xuseMap ) (setq xtoBrailleMap [ ["1" "⠼⠁"] ["2" "⠼⠃"] ["3" "⠼⠉"] ["4" "⠼⠙"] ["5" "⠼⠑"] ["6" "⠼⠋"] ["7" "⠼⠛"] ["8" "⠼⠓"] ["9" "⠼⠊"] ["0" "⠼⠚"] ["," "⠂"] [";" "⠆"] [":" "⠒"] ["." "⠲"] ["?" "⠦"] ["!" "⠖"] ["‘" "⠄"] ["“" "⠄⠶"] ["“" "⠘⠦"] ["”" "⠘⠴"] ["‘" "⠄⠦"] ["’" "⠄⠴"] ["(" "⠐⠣"] [")" "⠐⠜"] ["/" "⠸⠌"] ["\\","⠸⠡"] ["-" "⠤"] ["–" "⠠⠤"] ["—" "⠐⠠⠤"] ["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" "⠵"] ] ) (setq xuseMap (if ToLatinQ (mapcar (lambda (xx) (vector (aref xx 1) (aref xx 0))) xtoBrailleMap) xtoBrailleMap)) (save-excursion (save-restriction (narrow-to-region Begin End) (let ( (case-fold-search t)) (mapc (lambda (xx) (goto-char (point-min)) (while (search-forward (elt xx 0) nil t) (replace-match (elt xx 1) t t))) xuseMap))))))