UniCode Testing Results

UniCode Testing Results

Postby RAMESHBABU » Tue Sep 29, 2015 2:24 am

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 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

**********

 
Last edited by RAMESHBABU on Tue Sep 29, 2015 6:36 am, edited 3 times in total.
User avatar
RAMESHBABU
 
Posts: 625
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: UniCode Testing Results

Postby nageswaragunupudi » Tue Sep 29, 2015 4:21 am

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
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: UniCode Testing Results

Postby richard-service » Tue Sep 29, 2015 4:46 am

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
richard-service
 
Posts: 804
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: UniCode Testing Results

Postby dutch » Tue Sep 29, 2015 5:17 am

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 19.01 / 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
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: UniCode Testing Results

Postby RAMESHBABU » Tue Sep 29, 2015 5:49 am

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 view  RUN


#include "fivewin.ch"

REQUEST DBFCDX
REQUEST DBFFPT

FUNCTION MAIN()

LOCAL oDlg
LOCAL oSay  , cSay  := "姓名-例如堃,叙"
LOCAL oSay2 , cSay2 := "地址-例如堃,叙"
LOCAL oGet1 , cGet1 := SPACE( 100 )
LOCAL oGet2 , cGet2 := SPACE( 100 )
LOCAL oBut1 , oBut2

FW_SetUniCode(.T.)

USE testchinese alias TEST

GO BOTTOM

cGet1 := TEST->NAME
cGet2 := TEST->ADDR


DEFINE 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 oDlg
CLOSE DATABASE

RETURN NIL

FUNCTION WRITE_DBF( cGet1 , cGet2 )

      TEST->( DbRLock() )        
      TEST->NAME := cGet1
      TEST->ADDR := cGet2
      TEST->( DbCommit() )    
      TEST->( DbUnLock() )    

RETURN NIL

function 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: 625
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: UniCode Testing Results

Postby RAMESHBABU » Tue Sep 29, 2015 5:55 am

Dear Mr.Dutch,

This is my buildx.bat file.

Code: Select all  Expand view  RUN


@ECHO OFF
CLS
ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
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 :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST

ECHO Compiling...

if "%FWDIR%" == "" set FWDIR=C:\FWH\
if "%XHDIR%" == "" set XHDIR=c:\xharbour
rem if "%2" == "/b" set GT=gtwin
rem if not "%2" == "/b" set GT=gtgui
set GT=gtgui

set hdir=%XHDIR%
set hdirl=%hdir%\lib
set bcdir=c:\BCC7
set 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.log

echo -O2 -e%1.exe -I%hdir%\include -I%bcdir%\include %1.c > b32.bc
rem echo -O2 -e%1.exe -I%hdir%\include -I%bcdir%\include xbrowse.c >> b32.bc

%bcdir%\bin\bcc32 -M -c -v @b32.bc
:ENDCOMPILE

IF EXIST %1.rc %bcdir%\bin\brc32 -r -I%bcdir%\include %1

echo %bcdir%\lib\c0w32.obj + > b32.bc
echo %1.obj, + >> b32.bc
echo %1.exe, + >> b32.bc
echo %1.map, + >> b32.bc
echo c:\fwh\lib\Fivehx.lib c:\fwh\lib\FiveHC.lib + >> b32.bc
echo %hdirl%\rtl.lib + >> b32.bc
echo %hdirl%\vm.lib + >> b32.bc
echo %hdirl%\%GT%.lib + >> b32.bc
echo %hdirl%\lang.lib + >> b32.bc
echo %hdirl%\macro.lib + >> b32.bc
echo %hdirl%\rdd.lib + >> b32.bc
echo %hdirl%\dbfntx.lib + >> b32.bc
echo %hdirl%\dbfcdx.lib + >> b32.bc
echo %hdirl%\dbffpt.lib + >> b32.bc
echo %hdirl%\hbsix.lib + >> b32.bc
echo %hdirl%\debug.lib + >> b32.bc
echo %hdirl%\common.lib + >> b32.bc
echo %hdirl%\pp.lib + >> b32.bc
echo %hdirl%\pcrepos.lib + >> b32.bc
echo %hdirl%\ct.lib + >> b32.bc
echo %hdirl%\zlib.lib + >> b32.bc
echo %hdirl%\hbzip.lib + >> b32.bc
echo %hdirl%\hbzebra.lib + >> b32.bc
echo %hdirl%\libmisc.lib + >> b32.bc
echo %hdirl%\tip.lib + >> b32.bc
echo %hdirl%\png.lib + >> b32.bc

rem Uncomment these two lines to use Advantage RDD
rem echo %hdir%\lib\rddads.lib + >> b32.bc
rem echo %hdir%\lib\Ace32.lib + >> b32.bc

echo %bcdir%\lib\cw32.lib + >> b32.bc
echo %bcdir%\lib\import32.lib + >> b32.bc
echo %bcdir%\lib\uuid.lib + >> b32.bc
echo %bcdir%\lib\ws2_32.lib + >> b32.bc
echo %bcdir%\lib\psdk\odbc32.lib + >> b32.bc
echo %bcdir%\lib\psdk\rasapi32.lib + >> b32.bc
echo %bcdir%\lib\psdk\nddeapi.lib + >> b32.bc
echo %bcdir%\lib\psdk\msimg32.lib + >> b32.bc
echo %bcdir%\lib\psdk\psapi.lib + >> b32.bc
echo %bcdir%\lib\psdk\gdiplus.lib + >> b32.bc
echo %bcdir%\lib\psdk\iphlpapi.lib + >> b32.bc
echo %bcdir%\lib\psdk\shell32.lib, >> b32.bc

IF EXIST %1.res echo %1.res >> b32.bc

rem uncomment this line to use the debugger and comment the following one
if %GT% == gtwin %bcdir%\bin\ilink32 -Gn -Tpe -s -v @b32.bc
IF ERRORLEVEL 1 GOTO LINKERROR
if %GT% == gtgui %bcdir%\bin\ilink32 -Gn -aa -Tpe -s -v @b32.bc
IF ERRORLEVEL 1 GOTO LINKERROR
ECHO * Application successfully built *
%1
GOTO EXIT
ECHO

rem delete temporary files
@del %1.c

:COMPILEERRORS
@type comp.log
ECHO * Compile errors *
GOTO EXIT

:LINKERROR
ECHO * Linking errors *
GOTO EXIT

:SINTAX
ECHO    SYNTAX: Build [Program]     {-- No especifiques la extensi¢n PRG
ECHO                                {-- Don't specify .PRG extension
GOTO EXIT

:NOEXIST
ECHO 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
RAMESHBABU
 
Posts: 625
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: UniCode Testing Results

Postby richard-service » Tue Sep 29, 2015 6:40 am

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
richard-service
 
Posts: 804
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: UniCode Testing Results

Postby dutch » Tue Sep 29, 2015 7:02 am

Dear Ramesh,

Thank you, I can compile now.
Regards,
Dutch

FWH 19.01 / 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
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: UniCode Testing Results

Postby RAMESHBABU » Tue Sep 29, 2015 8:29 am

Dear Mr.Dutch,

Very good.

Thanks

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

Re: UniCode Testing Results

Postby RAMESHBABU » Tue Sep 29, 2015 8:34 am

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
RAMESHBABU
 
Posts: 625
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: UniCode Testing Results

Postby richard-service » Wed Sep 30, 2015 5:47 am

Dear Ramesh,

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

Code: Select all  Expand view  RUN

// Add this to your resources RC file

#ifdef __FLAT__
   1 24 "./WinXP/WindowsXP.Manifest"
#endif

new      BITMAP "./bitmaps/32x32/new.bmp"
quit     BITMAP "./bitmaps/32x32/quit.bmp"

TEST DIALOG 20, 41, 356, 86
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "測試  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
richard-service
 
Posts: 804
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: UniCode Testing Results

Postby Antonio Linares » Wed Sep 30, 2015 8:35 am

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: UniCode Testing Results

Postby cnavarro » Wed Sep 30, 2015 10:59 am

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
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 33 guests