lib/scripts/recode.pl
author wenzelm
Tue, 01 Apr 2014 22:25:01 +0200
changeset 56355 1a9f569b5b7e
parent 52835 0906c00bb21d
child 62506 860cd901ab43
permissions -rw-r--r--
some rephrasing to ensure that this becomes cheap "foreach" and not expensive "map" (cf. 0fc032898b05);

#
# Author: Makarius
#
# recode.pl - recode utf8 for ML
#

for (@ARGV) {
  utf8::upgrade($_);
  s/([\x80-\xff])/\\${\(ord($1))}/g;
  print $_, " ";
}