"UNICODE Compatiability", It is such a nice and strongest feature
awaiting since a long time is ultimately added to our FiveWin Library.
My sincere thanks to our Guru Mr.Antonio and other eminent people
working on this, in the background.
I have tested some of the basic features required to implement this
feature immediately into my applications.
As far as the tests I have conducted, I found it to be very good and
working 100% ok.
The following is the source I have used to test, and submitted the results
generated, from the test program.
The salient features covered in the test are:
A) Full support in XBROWSE.
B) Full support in SAYs and GETS.
C) Copy and Paste in GETs and in XBROWSER cells.
D) Export to MsExcel.
E) Full support is maintained in the REPORTS.
F) Multi Languages are supported in one String.
G) Sorting/Indexing is Full supported.
H) Combobox / ListBox are beatufully handling this UniCode feature.
-Ramesh Babu
uploading images
- Code: Select all Expand view RUN
#include "FiveWin.ch"
#include "XBrowse.ch"
REQUEST DBFCDX
FUNCTION Main()
LOCAL oFont, n
LOCAL cEnglish := "My Name is Ramesh Babu"
LOCAL cHindi := "मेरा नाम रमेश बाबु पमुजुला "
LOCAL cTelugu := "నా పేరు రమేశ్ బాబు పముజుల "
LOCAL cMulti := "My Name is रमेश बाबु పముజుల "
LOCAL aNames := {"ఆకాష్", "అభినవ్", "బలరామ్", "నాగార్జున", "కృష్ణ", "రమ్య", "విద్య", "హరీష్", "రమేశ్", "ఉపాసన", "సుజాత", "భూపతి", "వాణి"}
FIELD lang_1, lang_2, lang_3, multi_lang
FW_SetUnicode( .T. )
aNames := ASort(aNames,,,{|x,y|x < y})
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-12
IF .NOT. FILE("TESTUNIC.DBF")
Create_Dbf()
APPEND BLANK
REPLACE lang_1 WITH cEnglish, lang_2 WITH cHindi, lang_3 WITH cTelugu, multi_lang WITH cMulti
FOR n = 1 TO LEN(aNames)
APPEND BLANK
REPLACE lang_3 WITH aNames[n]
NEXT
INDEX ON lang_3 TAG "lang3" TO testunic
OrdSetFocus("lang_3")
ELSE
USE testunic
ENDIF
GO TOP
XBROWSER "TESTUNIC" TITLE FWVERSION + " UNICODE" FASTEDIT ;
SETUP ( oBrw:lCanPaste := .t., oBrw:nHeadStrAligns := AL_CENTER,;
oBrw:SetFont( oFont ), oBrw:nWidths := 230 )
RELEASE FONT oFont
Show_In_Dlg()
RETURN nil
**********
FUNCTION Show_In_Dlg()
LOCAL oDlg, oEnglish, oHindi, oTelugu, oMulti, oFont, oCombo, oSay, oSave, oCancel, lOk := .F.
LOCAL cEnglish, cHindi, cTelugu, cMulti
LOCAL cName := SPACE(75), aArray2 := {}, cSelected := SPACE(75), n
LOCAL aNames := {"ఆకాష్ ", "అభినవ్ ", "బలరామ్ " , "నాగార్జున ", "కృష్ణ ", "రమ్య ", "విద్య ", "హరీష్ ", "రమేశ్ ", "ఉపాసన ", "సుజాత ", "భూపతి ", "వాణి "}
FIELD lang_1, lang_2, lang_3, multi_lang
cEnglish := lang_1
cHindi := lang_2
cTelugu := lang_3
cMulti := multi_lang
cName := aNames[1]
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-12
DEFINE DIALOG oDlg TITLE "Editing UniCode Text through Dialog" SIZE 325, 260 FONT oFont
@ .8, 2 SAY "English:" OF oDlg
@ 1, 6 GET oEnglish VAR cEnglish OF oDlg SIZE 100, 10 COLOR "W+/G" PICTURE "@K150"
@ 1.7, 2 SAY "Hindi:" OF oDlg
@ 2, 6 GET oHindi VAR cHindi OF oDlg SIZE 100, 10 COLOR "W+/B*" PICTURE "@K75"
@ 2.5, 2 SAY "Telugu:" OF oDlg
@ 3, 6 GET oTelugu VAR cTelugu OF oDlg SIZE 100, 10 COLOR "B/GR*" PICTURE "@K75"
@ 3.4, 2 SAY "Multi:" OF oDlg
@ 4, 6 GET oMulti VAR cMulti OF oDlg SIZE 100, 10 COLOR "B/BG*" PICTURE "@K75"
@ 4.3, 2 SAY "Combo Test:" OF oDlg
@ 4.7, 6 COMBOBOX oCombo VAR cName ITEMS aNames OF oDlg SIZE 100,200 ;
ON CHANGE ( oDlg:SetText( aNames[oCombo:nAt] ), oDlg:oMsgBar:SetMsg( aNames[oCombo:nAt] ), oSay:SetText( aNames[oCombo:nAt] ) ) //, oGet:SetText( aNames[oCombo:nAt] ) )
@ 5.5, 2 SAY "Selected: " OF oDlg
@ 5.5, 8 SAY oSay VAR cSelected OF oDlg
@ 5.5, 13.2 BUTTON oSave PROMPT "&Save" OF oDlg SIZE 30, 12 ACTION (lOk := .T., oDlg:End())
@ 5.5, 19.4 BUTTON oCancel PROMPT "&Cancel" OF oDlg SIZE 30, 12 ACTION oDlg:End() CANCEL
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT ( oDlg:oMsgBar := TMsgBar():New( oDlg, "Message - "+aNames[1], .F., .F., .F., .F.,,,, .F. ) )
RELEASE FONT oFont
IF lOk
GO TOP
REPLACE lang_1 WITH cEnglish, lang_2 WITH cHindi, lang_3 WITH cTelugu, multi_lang WITH cMulti
SKIP
FOR n = 1 TO LEN(aNames)
REPLACE lang_3 WITH aNames[n]
SKIP
NEXT
ENDIF
RETURN nil
**********
FUNCTION Create_Dbf()
LOCAL aStruct := {{ "LANG_1" , "C", 75, 0 }, ;
{ "LANG_2" , "C", 75, 0 }, ;
{ "LANG_3" , "C", 75, 0 }, ;
{ "MULTI_LANG", "C", 75, 0 }}
DbCreate( "testunic", aStruct, "DBFCDX", .T., "TESTUNIC" )
RETURN nil
**********