Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unicode
Message
From
21/05/2009 15:04:29
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01401339
Message ID:
01401406
Views:
33
Hi
I can search file with hebrew file name and to see it well in my cursor, but I cannot search for all doc that contain some hebrew string (Its seems that filer can speak hebrew with other but not with filer by himself).
BTW I didnt success to send the hebrew string as parameter

>Hi Chaim,
>
>If filer return strings in UNICODE...
>
>*...
>Create Cursor (m.tcCursorName) ;
>  (filepath M NOCPTRANS, filename M NOCPTRANS, ;
>  FileSize i, fattr c(8), createtime T, lastacc T, lastwrite T)
>*...
>
>
>MartinaJ
>
>>Hi
>>I use VFP Filer for to find files (thanks to cetin Thread #981681 Message #981692).
>>I can find all documents even if the file name in hebrew.
>>The probem is with to find files wich contain strings in hebrew.
>>
>>Here is the code:
>>
lcStartDir = "c:\"
>>lnFiles = GetTree(m.lcStartDir,'*.doc', 'myCursor', .t.)
>>Select * from myCursor order by filepath,filename
>>
>>Function GetTree
>>Lparameters tcStartDir,tcSkeleton,tcCursorName,;
>>  tlSubfolders,;
>>  tlWholeWords,tlIgnoreCase,tlSearchAnd,tcSearch1,tcSearch2,tcSearch3
>>Create Cursor (m.tcCursorName) ;
>>  (filepath c(250), filename c(250), ;
>>  FileSize i, fattr c(8), createtime T, lastacc T, lastwrite T)
>>Local oFiler, lnFound
>>oFiler = Createobject('filer.fileutil')
>>With oFiler
>>  .SearchPath = m.tcStartDir
>>  .FileExpression = m.tcSkeleton && Search for skeleton
>>  .Subfolder   = iif(m.tlSubfolders,1,0)  && Check subfolders
>>  .IgnoreCase  = iif(m.tlIgnoreCase,1,0)
>>  .WholeWords  = iif(m.tlWholeWords,1,0)
>>  .SearchAnd   = iif(m.tlSearchAnd,1,0)
>>  .SearchText1 = 'YXYXYXY'&&iif(empty(m.tcSearch1),"",m.tcSearch1)*****************************Here I will find all docs with 'YXYXYXY' content, but not hebrew string
>>  .SearchText2 = iif(empty(m.tcSearch2),"",m.tcSearch2)
>>  .SearchText3 = iif(empty(m.tcSearch3),"",m.tcSearch3)
>>  lnFound = .Find(0)
>>  For ix=1 To m.lnFound
>>    With .Files(ix)
>>      If !(Bittest(.Attr,4) And .Name = '.')
>>        Insert Into (tcCursorName) ;
>>          (filepath, filename, FileSize, fattr, createtime, lastacc, lastwrite)  ;
>>          values ;
>>          (.Path, .Name, .Size, Attr2Char(.Attr), ;
>>          Num2Time(.Datetime), Num2Time(.LastAccessTime), Num2Time(.LastWriteTime))
>>      Endif
>>    Endwith
>>  Endfor
>>Endwith
>>Return lnFound
>>
>>Function Num2Time
>>Lparameters tnFloat
>>Return Dtot({^1899/12/30}+Int(m.tnFloat))+86400*(m.tnFloat-Int(m.tnFloat))
>>
>>Function Attr2Char
>>Lparameters tnAttr
>>Return ;
>>  IIF(Bittest(tnAttr,0),'RO','RW')+;
>>  IIF(Bittest(tnAttr,1),'H','_')+;
>>  IIF(Bittest(tnAttr,2),'S','_')+;
>>  IIF(Bittest(tnAttr,4),'D','_')+;
>>  IIF(Bittest(tnAttr,5),'A','_')+;
>>  IIF(Bittest(tnAttr,6),'E','_')+;
>>  IIF(Bittest(tnAttr,7),'N','_')
>>
Thank you
Chaim
Previous
Reply
Map
View

Click here to load this message in the networking platform