|
Computers & Writing Systems
You are here: Encoding > Unicode > Training Perl Character Count
Contents Goals for this stepHere is an easy character count utility for those who have Perl installed. This step is part of the procedure How to Write a Conversion Mapping for your Legacy Font. Running a character count on a legacy text file.Download the utilityIf you didn't download the program during setup, you will need a copy of the program
Prepare the filesUnzip the file and place a copy of MakeCharList.pl in your work folder. You may also wish to place a copy in a more permanent location for stand-alone programs of this type. You should already have a copy of your legacy text file in your work folder. Run the ProgramFrom Windows Explorer, right-click your work folder name. Select Type the following command in the Command Window, replacing inputfile with your legacy file name. Make up a name for the outputfile name. Don't leave out the "<>" signs. perl MakeCharList.pl inputfile > outputfile OR MakeCharList.pl < inputfile > outputfile Beginning with version 3, you can add -f -r to either command to get the data sorted in reverse order of frequency. Note: We recommend you use all lower case characters for filenames. Put quotes around names with spaces. Review the resultsOpen the outputfile in Word. Change the 4th column (Legacy) to your legacy font, (if you have one). The 5th column shows the number of occurrences in the file for each character in your legacy font. ![]() Sample character count Here is a sample of results from a legacy file using the SIL IPA93 font. Save this file as a Word document. Close the terminal window by typing "Exit" and pressing Enter. Page History2008-02-22 JW: reviewed, minor updates 2005-10-24 JW: Page created © 2003-2023 SIL International, all rights reserved, unless otherwise noted elsewhere on this page. |