Help for this page

Select Code to Download


  1. or download this
    # assuming 5.8.1 or later:
    
    perl -C9 -pe 's/([^[:ascii:]])/sprintf("\\x{%.4x}",ord $1)/eg' sometex
    +t.utf8
    
    # that is, leave ascii data as-is, convert wide characters to "\x{HHHH
    +}"
    
  2. or download this
    perl -pe 'BEGIN{binmode STDIN,":encoding(iso-8859-5)"} s/([^[:ascii:]]
    +)/sprintf("\\x{%.4x}",ord $1)/eg' < iso-cyrillic.txt