UniCode Testing Results

Post Reply
User avatar
RAMESHBABU
Posts: 634
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India
Been thanked: 6 times

UniCode Testing Results

Post by RAMESHBABU »

Dear Friends,

"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

Image
uploading images

Code: Select all | Expand

#include "FiveWin.ch"#include "XBrowse.ch"REQUEST DBFCDXFUNCTION Main()LOCAL oFont, nLOCAL 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_langFW_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 testunicENDIFGO TOPXBROWSER "TESTUNIC" TITLE FWVERSION + " UNICODE" FASTEDIT                ;         SETUP ( oBrw:lCanPaste := .t., oBrw:nHeadStrAligns := AL_CENTER,;                 oBrw:SetFont( oFont ), oBrw:nWidths := 230 )RELEASE FONT oFontShow_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   ENDIFRETURN 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********** 
Last edited by RAMESHBABU on Tue Sep 29, 2015 6:36 am, edited 3 times in total.
User avatar
nageswaragunupudi
Posts: 10733
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 11 times
Contact:

Re: UniCode Testing Results

Post by nageswaragunupudi »

The best way to test the Unicode capabilities of FWH is to take any existing working application, big or small, dealing with data in DBF format (nor ADO) and insert one single line at the top of main function
FW_SetUnicode(.t.)
and rebuild the application.

The entire application works with any language and many language at the same time.

It is highly desirable to increase the field widths of all character fields by 2 to 3 times.

Present Limitations:

ADO/OLE do not work, due to Limitations of (x)Harbour. We will find solution soon.

In case of Get of Unicode text, oGet:oGet:datas and metods may not be fully available.

Try testing with any existing application and I am sure you will not be disappointed.
Regards

G. N. Rao.
Hyderabad, India
User avatar
richard-service
Posts: 815
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: UniCode Testing Results

Post by richard-service »

Hi Rao,

Couold you help to compile EXE that let me test Chinese language?

http://www.fivetech.com.tw/downloads/testchinese.rar
http://www.fivetech.com.tw/downloads/testchinese-u8.rar

Thanks a lot.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
dutch
Posts: 1582
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand
Been thanked: 3 times

Re: UniCode Testing Results

Post by dutch »

Dear Ramesh,

How can you compile your sample? I cannot compile your code, it has an error "Error E0016". Could you send me your buildx.bat which can compile your code please?

Thanks
Regards,
Dutch

FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
User avatar
RAMESHBABU
Posts: 634
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India
Been thanked: 6 times

Re: UniCode Testing Results

Post by RAMESHBABU »

Hi Richard,

I have tested your code testchinese-u8.prg and
is working ok. The screen shots of the input
and output is show below:

Image
screen shot

Code: Select all | Expand

#include "fivewin.ch"REQUEST DBFCDXREQUEST DBFFPTFUNCTION MAIN()LOCAL oDlgLOCAL oSay  , cSay  := "姓名-例如堃,叙"LOCAL oSay2 , cSay2 := "地址-例如堃,叙"LOCAL oGet1 , cGet1 := SPACE( 100 )LOCAL oGet2 , cGet2 := SPACE( 100 )LOCAL oBut1 , oBut2FW_SetUniCode(.T.)USE testchinese alias TESTGO BOTTOMcGet1 := TEST->NAMEcGet2 := TEST->ADDRDEFINE DIALOG oDlg  FROM 10 , 10 TO 40 , 150@ 1 ,  1 SAY oSay2 PROMPT cSay2 OF oDlg@ 2 ,  1 SAY oSay  PROMPT cSay OF oDlg@ 4 ,  1 GET oGet1 VAR cGet1 OF oDlg@ 5 ,  1 GET oGet2 VAR cGet2 OF oDlg@ 6 ,  1 BUTTON oBut2 PROMPT "WRITE" ACTION write_dbf( cGet1 , cGet2 )@ 6 , 10 BUTTON oBut1 PROMPT "PRINT" ACTION printtest()ACTIVATE DIALOG oDlgCLOSE DATABASERETURN NILFUNCTION WRITE_DBF( cGet1 , cGet2 )      TEST->( DbRLock() )               TEST->NAME := cGet1      TEST->ADDR := cGet2      TEST->( DbCommit() )          TEST->( DbUnLock() )    RETURN NILfunction PrintTest()   local oPrn // := TPrinter():New( "Test", .F., .T.)   local fntArial   local nRow := 1   DEFINE FONT fntArial NAME "Arial" SIZE 0 , -80    PRINT oPrn NAME "Testing the Unicode Implemention from FiveWin" PREVIEW   oPrn:StartPage()   GO TOP                        // starts a new page   DO WHILE !EOF()      oPrn:Say( nRow * 100,   10, TEST->NAME, fntArial )      oPrn:Say( nRow * 100, 1000, TEST->ADDR, fntArial )      nRow ++      SKIP   ENDDO   oPrn:EndPage()                          // ends this page   ENDPRINT   RELEASE FONT fntArial   *oPrn:End()return nil//---------------------------------------------------------------------------// 


And the code with little modifications to prevew the out is shown below:
You can compile and check yourself.

In case you need the .EXE and .DBF, plz. write to my email : a k s h a r a s o f t @ g m a i l . c o m

Regards,

-Ramesh Babu P
User avatar
RAMESHBABU
Posts: 634
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India
Been thanked: 6 times

Re: UniCode Testing Results

Post by RAMESHBABU »

Dear Mr.Dutch,

This is my buildx.bat file.

Code: Select all | Expand

@ECHO OFFCLSECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ECHO ³ FiveWin for xHarbour 15.09 - Sep. 2015          xHarbour development power ³ÜECHO ³ (c) FiveTech 1993-2015 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8/10 ³ÛECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛECHO ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßif A%1 == A GOTO :SINTAXif NOT EXIST %1.prg GOTO :NOEXISTECHO Compiling...if "%FWDIR%" == "" set FWDIR=C:\FWH\if "%XHDIR%" == "" set XHDIR=c:\xharbourrem if "%2" == "/b" set GT=gtwinrem if not "%2" == "/b" set GT=gtguiset GT=gtguiset hdir=%XHDIR%set hdirl=%hdir%\libset bcdir=c:\BCC7set fwh=%FWDIR%%hdir%\bin\harbour %1 /n /i%fwh%\include;%hdir%\include /w /p %2 %3 > comp.log rem %hdir%\bin\harbour xbrowse /n /i%fwh%\include;%hdir%\include /w /p %2 %3> > comp.log IF ERRORLEVEL 1 GOTO COMPILEERRORS@type comp.log@type warnings.logecho -O2 -e%1.exe -I%hdir%\include -I%bcdir%\include %1.c > b32.bcrem echo -O2 -e%1.exe -I%hdir%\include -I%bcdir%\include xbrowse.c >> b32.bc%bcdir%\bin\bcc32 -M -c -v @b32.bc:ENDCOMPILEIF EXIST %1.rc %bcdir%\bin\brc32 -r -I%bcdir%\include %1echo %bcdir%\lib\c0w32.obj + > b32.bcecho %1.obj, + >> b32.bcecho %1.exe, + >> b32.bcecho %1.map, + >> b32.bcecho c:\fwh\lib\Fivehx.lib c:\fwh\lib\FiveHC.lib + >> b32.bcecho %hdirl%\rtl.lib + >> b32.bcecho %hdirl%\vm.lib + >> b32.bcecho %hdirl%\%GT%.lib + >> b32.bcecho %hdirl%\lang.lib + >> b32.bcecho %hdirl%\macro.lib + >> b32.bcecho %hdirl%\rdd.lib + >> b32.bcecho %hdirl%\dbfntx.lib + >> b32.bcecho %hdirl%\dbfcdx.lib + >> b32.bcecho %hdirl%\dbffpt.lib + >> b32.bcecho %hdirl%\hbsix.lib + >> b32.bcecho %hdirl%\debug.lib + >> b32.bcecho %hdirl%\common.lib + >> b32.bcecho %hdirl%\pp.lib + >> b32.bcecho %hdirl%\pcrepos.lib + >> b32.bcecho %hdirl%\ct.lib + >> b32.bcecho %hdirl%\zlib.lib + >> b32.bcecho %hdirl%\hbzip.lib + >> b32.bcecho %hdirl%\hbzebra.lib + >> b32.bcecho %hdirl%\libmisc.lib + >> b32.bcecho %hdirl%\tip.lib + >> b32.bcecho %hdirl%\png.lib + >> b32.bcrem Uncomment these two lines to use Advantage RDDrem echo %hdir%\lib\rddads.lib + >> b32.bcrem echo %hdir%\lib\Ace32.lib + >> b32.bcecho %bcdir%\lib\cw32.lib + >> b32.bcecho %bcdir%\lib\import32.lib + >> b32.bcecho %bcdir%\lib\uuid.lib + >> b32.bcecho %bcdir%\lib\ws2_32.lib + >> b32.bcecho %bcdir%\lib\psdk\odbc32.lib + >> b32.bcecho %bcdir%\lib\psdk\rasapi32.lib + >> b32.bcecho %bcdir%\lib\psdk\nddeapi.lib + >> b32.bcecho %bcdir%\lib\psdk\msimg32.lib + >> b32.bcecho %bcdir%\lib\psdk\psapi.lib + >> b32.bcecho %bcdir%\lib\psdk\gdiplus.lib + >> b32.bcecho %bcdir%\lib\psdk\iphlpapi.lib + >> b32.bcecho %bcdir%\lib\psdk\shell32.lib, >> b32.bcIF EXIST %1.res echo %1.res >> b32.bcrem uncomment this line to use the debugger and comment the following oneif %GT% == gtwin %bcdir%\bin\ilink32 -Gn -Tpe -s -v @b32.bcIF ERRORLEVEL 1 GOTO LINKERRORif %GT% == gtgui %bcdir%\bin\ilink32 -Gn -aa -Tpe -s -v @b32.bcIF ERRORLEVEL 1 GOTO LINKERRORECHO * Application successfully built *%1GOTO EXITECHOrem delete temporary files@del %1.c:COMPILEERRORS@type comp.logECHO * Compile errors *GOTO EXIT:LINKERRORECHO * Linking errors *GOTO EXIT:SINTAXECHO    SYNTAX: Build [Program]     {-- No especifiques la extensi¢n PRGECHO                                {-- Don't specify .PRG extensionGOTO EXIT:NOEXISTECHO The specified PRG %1 does not exist:EXIT


View this thread for my posting, in reply to your question:

viewtopic.php?f=3&t=31379

-Ramesh Babu P
User avatar
richard-service
Posts: 815
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: UniCode Testing Results

Post by richard-service »

Dear Ramesh
I sent Test Unicode Chinese V2 to your EMail, Please check it.

Thanks a lot.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
dutch
Posts: 1582
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand
Been thanked: 3 times

Re: UniCode Testing Results

Post by dutch »

Dear Ramesh,

Thank you, I can compile now.
Regards,
Dutch

FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
User avatar
RAMESHBABU
Posts: 634
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India
Been thanked: 6 times

Re: UniCode Testing Results

Post by RAMESHBABU »

Dear Mr.Dutch,

Very good.

Thanks

-Ramesh Babu P
User avatar
RAMESHBABU
Posts: 634
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India
Been thanked: 6 times

Re: UniCode Testing Results

Post by RAMESHBABU »

Dear Richard,

I have tested your code and it is working ok except that the text from the
RC file is not converted.

We have to request our Guru Mr.Antonio and his team for that.

I have attached the screen shots indicating the restults of your Program.

Image
free image host

-Ramesh Babu P
User avatar
richard-service
Posts: 815
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: UniCode Testing Results

Post by richard-service »

Dear Ramesh,

My Chinese sample, PRG and RC save UTF-8 style.

Code: Select all | Expand

// Add this to your resources RC file#ifdef __FLAT__   1 24 "./WinXP/WindowsXP.Manifest"#endifnew      BITMAP "./bitmaps/32x32/new.bmp"quit     BITMAP "./bitmaps/32x32/quit.bmp"TEST DIALOG 20, 41, 356, 86STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENUCAPTION "測試  Unicode 繁體中文(Traditional Chinese)-例如堃,叙"FONT 12, "細明體"{ EDITTEXT 201, 68, 7, 170, 12 EDITTEXT 202, 68, 22, 99, 12 CONTROL "存檔", 301, "BUTTON", BS_USERBUTTON | WS_TABSTOP, 302, 8, 46, 18 CONTROL "取消", 302, "BUTTON", BS_USERBUTTON | WS_TABSTOP, 302, 29, 46, 18 CONTROL "列印", 303, "BUTTON", BS_USERBUTTON | WS_TABSTOP, 302, 50, 46, 18 LTEXT "中文地址", 101, 5, 7, 60, 12 LTEXT "中文姓名", 102, 5, 22, 60, 12} 
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
Antonio Linares
Site Admin
Posts: 42808
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 122 times
Been thanked: 117 times
Contact:

Re: UniCode Testing Results

Post by Antonio Linares »

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
cnavarro
Posts: 6655
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Has thanked: 7 times
Been thanked: 10 times

Re: UniCode Testing Results

Post by cnavarro »

Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Post Reply