John Mastro [2018-03-19 15:04:29-07] wrote: > There are "Unidecode" packages for Perl[1], Python[2], and Emacs[3] > (derived from one another in that order). They each transliterate > Unicode text to ASCII, e.g.: > > (unidecode "Déjà vu") > ;=> "Deja vu" > (unidecode "北亰") > ;=> "Bei Jing " > > Does Emacs have equivalent functionality built-in? I don't know of any built-in functions but external "iconv" tool can do similar thing for Latin scripts. Here's an example Emacs Lisp function wrapper for "iconv": (defun tl-ascii-translit (string) (with-temp-buffer (insert string) (call-process-region (point-min) (point-max) "iconv" t t nil "-t" "ASCII//TRANSLIT") (buffer-substring-no-properties (point-min) (point-max)))) Works for Latin scripts: (tl-ascii-translit "Déjà vu") ;=> "Deja vu" (tl-ascii-translit "北亰") ;=> "??" -- /// Teemu Likonen - .-.. // // PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 ///