Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cyrilic to latinic
Message
De
23/10/2021 09:43:16
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
23/10/2021 08:48:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01682589
Message ID:
01682590
Vues:
71
>Is there a way to recognize character in a file which is cyrilic (ascii code or other way) and convert it to appropriate latinic character (for example ц инто c, л инто l, п into p, ћ into ć ...). VFP 6 doesn't recognize unicode and my database is latinic.

You can build your own strings for a good chrtran, just need to set your editor's font into 1250 when you do it for latinica, and to 1251 when you do ćirilica. And then a strtran() for converting converting њ, љ, џ into nj, lj and dž also uppercase. There may be some snafu when the first word in a sentence begins with one of these, then they should convert into Nj, Lj and Dž, otherwise into NJ, LJ and DŽ for uppercased words. That's about the only thing complicated about it.

Here, you copy this while your codepage is set to ćirilica
lcCyr="абвгдђежзијклмнопрстћуфхцчшАБВГДЂЕЖЗИЈКЛМНОПРСТЋУФХЦЧШ"
Then set your codepage to latinica and copy this
lcLat="abvgdđežzijklmnoprstćufhcčšABVGDĐEŽZIJKLMNOPRSTĆUFHCČŠ"

Note that these don't contain the characters for lj, nj and dž, these must be done separately. About the case of đ being represented as dj, it is entirely wrong, there are so many cases when dj is not đ, see at http://ndragan.com/langsr/djilidj.html

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform