[sword-devel] testing for diacritics

Matěj Cepl mcepl at cepl.eu
Thu Aug 27 16:27:13 MST 2015


On 2015-08-27, 22:22 GMT, Peter von Kaehne wrote:
> Is there a clever and reliable way one could test in a given OSIS text
> to see whether it contains diacritically enhanced texts or not? Perl,
> preferably. 

What about the following?

    $ iconv -f utf8 -t us-ascii//translit file.xml \
        |diff -u - file.xml

No need for Perl!

Matěj

-- 
http://www.ceplovi.cz/matej/, Jabber: mcepl at ceplovi.cz
GPG Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
 
There is no reason to suppose that most human beings are engaged
in maximizing anything unless it be unhappiness, and even this
with incomplete success.
    -- Ronald Coase
       Introduction to “The Firm, the Market, and the Law”




More information about the sword-devel mailing list