Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
J and J
Message
De
17/09/2004 11:21:17
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turquie
 
 
À
17/09/2004 08:21:09
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00942813
Message ID:
00943414
Vues:
10
Teþekkürler Çetin,

>Hayir olmayacak. Basit mantik siralama icin once hersey upper() ki bu isin A a kismini halletsin.
>Sonraki problem ç nin c ile d arasinda yer almasi. ç yerine 'c'+chr(asc('z')+1) olunca o da halloluyor. Yani gene c ile baslayanlar geliyor ama normal c'lerden sonra. Sadece Turkce karakterlerin oldugu yerler 2 byte oldugundan fazla genisleme problemi de yok (VFP,general,unicode gibi tum karakterleri 2 katina cikarmiyoruz).
>Fox4um'da ornek kodlari yazmistim Tarkan'la ilgili bir mesajdaydi galiba.
>Cok da problem degil rapor icin almak:
>
>select *,tupper(myField) as Sorter from myTable ;
>where tupper(myField) between 'A' and 'C' ;
>order by sorter && A - Ç
>
>select *,tupper(myField) as Sorter from myTable ;
>where tupper(myField) between 'A' and 'CZ' ;
>order by sorter && A - C
>
>eger tupper() indexýn varsa hýz da problem olmuyor ) benim yillardir :
>tupper(First+Last) ve tupper(Last+First) indexlerim var.
>
>galiba sys(15) di mapping yapiyor o da efektif numara.
>
>Bir baska basit numara indexte dogrudan harfler yerine o harflerin alfebedeki sirasini kullanip (sadece biraz daha okunabilir olsun diye) 64 filan eklemek:
>
>#Define Alphabet "ABCÇDEFGÐHIÝJKLMNOÖPRSÞTUÜVYZ"
>? IndexExpr('çetin baþöz')
>? IndexExpr('Çetin baÞÖz')
>
>? IndexExpr('cetin baÞÖz')
>? IndexExpr('çetin baþöz')
>? IndexExpr('detin baÞÖz')
>
>Create Cursor myTest (myName c(20))
>Insert Into myTest Values ('çetin baþöz')
>Insert Into myTest Values ('ibrahim çetin baþöz')
>Insert Into myTest Values ('cemil')
>Insert Into myTest Values ('ýtýr')
>Insert Into myTest Values ('iskender')
>Insert Into myTest Values ('özgür')
>Insert Into myTest Values ('osman')
>Insert Into myTest Values ('þakir')
>Insert Into myTest Values ('salim')
>Insert Into myTest Values ('ülgen')
>Insert Into myTest Values ('ulaþ')
>Insert Into myTest Values ('vezir')
>Insert Into myTest Values ('remzi')
>Insert Into myTest Values ('gül')
>Insert Into myTest Values ('ðül :)')
>Copy To Array auppers
>For jx=1 To Alen(auppers,1)
>    auppers[jx,1] = tupper(auppers[jx,1])
>Endfor
>Append From Array auppers
>
>Select myName, IndexExpr(myName) As Sorter ;
>    from myTest ;
>    order By Sorter
>
>Select myName, IndexExpr(myName) As Sorter ;
>    from myTest ;
>    where IndexExpr(myName) Between IndexExpr('A') And IndexExpr('Ç') ;
>    order By Sorter
>
>
>
>
>Function IndexExpr
>    Lparameters tcStr
>    tcStr = tupper(m.tcStr)
>    Local ix,lcStr
>    lcStr=''
>    For ix=1 To Len(m.tcStr)
>        lcStr = lcStr + Chr(64+At(Substr(m.tcStr,m.ix,1),Alphabet))
>    Endfor
>    Return m.lcStr
>
>Function tupper
>    Lparameters tcStr
>    Return Upper(Chrtran(tcStr,'ðþýi','ÐÞIÝ'))
>
Cetin
>
>
>
>>Ama þimdi o zaman da þöyle bir sorun olmayacak mý? bir rapor alýnacak. kullanýcý a ve ç arasýný liste almak istedi. bu durumda program herkesi verir. öyle deðil mi? bu durumlar için fonksiyon da kullanmak istemiyorum. galiba ben böyle j ve de ý harflerinin problemlerini kabullenip devam edicem...
>>
>>>Metin,
>>>You never need to use Turkish collate. Check fox4um - search with keywords like tupper,index,collate.
>>>Cetin
>>>
>>>
>>>>Bad news, :(
>>>>
>>>>I have to use Turkish collate...
>>>>
>>>>Thanks,
>>>>
>>>>>> I reveal at testing ;
>>>>>> "j"="J" gives true result.
>>>>>>
>>>>>> It give that result with Foxpro dos and VFP... I amazed how I didn't reveal
>>>>>> that and I'm wondering why?
>>>>>
>>>>>Does it depend on your current Collate setting ?
>>>>>
>>>>>SET COLLATE TO "MACHINE"
>>>>>? "j" = "J"   && .F.
>>>>>SET COLLATE TO "GENERAL"
>>>>>? "j" = "J"   && .T.
>>>>>
>>>>>
>>>>>hth
>>>>>-Stefan
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform