D
Dan_Parker
Guest
Thanks, you saved me a lot of time. I like sed and use it frequently. I will have no problem using it. I hope your health improves.I am just using sed – stream editor. The standard command line utility for unix – it shows up on all flavors Sun, Linux, Caldera, etc. Some versions of sed can’t do escape sequences such as "
" for newline, etc – but you mentioned Linux and that has Gnu-sed which is bullet-proof.
Here it is wrapped in a shell script, chmod +x sedscript to make it executable.
It looks like I might have a loose iota subscript being placed under the omegas – I am not sure what the diacritics are supposed to be anyway, as I strip them except for rough breathing and the large tilde for my purposes – so take a good look.Code:#!/bin/bash cat $1 | sed -e "y%abcdefghijklmnopqrstu!wxyz%αβχδεφγηιςκλμνοπθρστυ!ωξ!ζ%" -e "y%ABCDEFGHIJKLMNOPQRSTU!WXYZ%ΑΒΧΔΕΦΓΗΙΣΚΛΜΝΟΠΘΡΣΤΥ!ΩΞ!Ζ%" -e "s%\]%.%g" -e "s%/|%|/%g" -e "s%V%\xca\xbc%g" -e "s%v%\xcc\x93%g" -e "s%,%\xcc\x81%g" -e "s%\`%\xcc\x94%g" -e "s%-%\xcc\x83\xcc\x94%g" -e "s%=%\xcc\x83\xcc\x93%g" -e "s%.]%\xcc\x80%g" -e "s%/]%\xcd\x85%g" -e "s%|]%\xcc\x83%g" -e "s%]%\xcc\x81\xcc\x94%g" -e "s%]]%\xcc\x80\xcc\x94%g" -e "s%;%\xcc\x93\xcc\x80%g" -e "s%:space:]][0-9]% &%g" > $2
Yes, Normalization to the NFC form will fix the font issues…
Unfortunately, the easiest to do normalization on is Java.
There is a perl script, but something was out of date and it failed to load the conversion tables properly…
search.cpan.org/~sadahiro/Unicode-Normalize-1.03/Normalize.pm
I also came across a php version, but it is just the class library and it was too convoluted for me to figure out last night. You would have to write a driver program to call the class subroutines … and the straight forward load file, dump through normalizer, and dump output program I wrote puked on several directory dependencies… etc. So I gave up and went to bed…
If you want to do some digging and working on these programs, I would be happy to give you pointers about what I know. I know how these things work – I just am unable to concentrate sufficiently to bring all the pieces together. Medical issues…
–Andrew.
Best Regards,
Dan