At 10:58 AM +0400 3/25/01, Vladimir Ivanov wrote:
>Dear friends,
>
>We work in Microsoft Word under Windows 2000
Word 2000, I hope? Any version of Word is notably slow at sorting
tables. Excel sorts much faster than word, and Access database sorts
much faster than Excel.
>on Persian-Russian dictionaries and need standard Persian sorting.
>This standard is described, for instance, in (Editing Guide
>"Rahnema-ye Virayesh", Gholam Hoseyn Gholam Hoseyn Zadeh, Tehran,
>2000 (1379), pp.106-107).
How complex a sort is that? I assume that it is not a simple-minded
single-level binary or alphabetic sort.
[snip]
>We get the same result in Windows "Input locals" set to Farsi,
>English or Russian.
You might do better to find software that can sort your data
correctly, and then convert the Word documents into that format and
back. If you can't, however, read on.
The general technique for getting sort orders other than those
provided in the system is to build your own sort encoding, and
translate the data to be sorted into that encoding. The Unicode
collation algorithm describes how to do this in a way that can be
adapted to any language and writing system, with some real effort for
understanding the algorithm, and a moderate effort for coding. This
algorithm does not do library catalog or telephone book quality
sorts, which require far more elaborate software.
It is usually fairly easy to create a Perl script to do the encoding,
once you know what you want done. You have to tell Perl how to handle
multiple-byte sequences explicitly, since it doesn't really handle
Unicode directly.
I assume that your dictionary data are in table form. Whatever the
program, add a column (Word or Excel), or a field (Access or any
other database). Encode the field you want sorted, and put the
encoding in the new column/field. Then sort on it.
Historical note: Bell Labs invented a computer language, Snobol,
specifically for sorting telephone books and performing other
large-scale text massaging. (We will not discuss the prehistoric sort
generators.)
--Edward Cherlin Generalist "A knot!" exclaimed Alice. "Oh, do let me help to undo it." Alice in Wonderland
This archive was generated by hypermail 2.1.2 : Fri Jul 06 2001 - 00:17:15 EDT