FWH 15.08 UNICODE support: Beginnings

FWH 15.08 UNICODE support: Beginnings

Postby nageswaragunupudi » Sun Sep 13, 2015 6:25 pm

FWH 15.08 provides limited support for Unicode. This is to get some idea of what is possible in this version.

Sample xbrowse:
Image

Please excuse me if there are any mistakes or blunders in the translation. I just adopted Google's translation for demonstration purposes.

Sample of Report generated by XBrowse:
Image

Sample of export to Excel:
Image

How I created the above data: I do not know three of the above languages. First I created a DBF with all columns but data only in English field. Then I opened Google Translate page and sought translations of the English words in different languages. I copied the translated words and pasted into the XBrowse.

As you know, if the cells of xBrowse are made editable and oBrw:lCanPaste is set to .T., we can copy text from any external source and paste into xbrowse cells and the pasted data is automatically saved in the data source. From FWH15.08 it is possible to copy/paste Unicode text also.

What is the present level of Unicode support now:

On windows many common controls like Say, Buttons, BtnBmp. Buttonbars, Menus, Browses, etc support display of Unicode text. On dialogs only xbrowse, btnbmp can support unicode.

Editing is still not supported. While the controls display the unicode text correctly for the first time, subsequent modification of text may not work as expected.

With the support and help from all, we can expect our colleagues in the FWH team will soon provide us with a fully functional version.

By the way, this is a small and simple program I put together to create the DBF with the above data. Any one can try this program to create a DBF with different languages. (Need to wait for release of revised build)
Code: Select all  Expand view
#include "FiveWin.Ch"

REQUEST DBFCDX

function Main()

   local cDbf  := "UTF8_02.DBF"
   local oFont

    RDDSETDEFAULT( "DBFCDX" )
   FW_SetUnicode( .t. )

   if ! File( cDBF ); CreateDBF( cDBF ); endif
   USE ( cDBF ) NEW ALIAS UTF SHARED

   DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-16 BOLD
   XBROWSER "UTF" TITLE FWVERSION + " UNICODE" FASTEDIT ;
      SETUP ( oBrw:lCanPaste := .t., oBrw:Urdu:nDataStrAlign := AL_RIGHT, ;
      oBrw:nHeadStrAligns := AL_CENTER, oBrw:SetFont( oFont ), oBrw:nWidths := 100 )
   RELEASE FONT oFont

return (0)

static function CreateDBF( cDBF )

   local aCols    := { { "ENGLISH", 'C', 10, 0 } }

   AEval( { "CHINESE", "KOREAN", "HINDI", "TELUGU", "URDU" }, ;
      { |c| AAdd( aCols, { c, 'C', 20, 0 } ) } )

   DBCREATE( cDBF, aCols, "DBFCDX", .t., "UTF" )
   FW_ArrayToDBF( { {"Apple"}, {"Ball"}, {"Cat"}, {"Doll"}, {"Engine"}, {"Fruit"}, {"Good"}, {"High"} }, "ENGLISH" )
   CLOSE UTF

return nil
 

How xbrowse makes complex tasks simple?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10622
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FWH 15.08 UNICODE support: Beginnings

Postby rhlawek » Tue Sep 15, 2015 10:55 pm

With build 2 this sample code is not working for me at all, editing any of the fields then doing a copy/paste of a unicode character displays only double question marks. If the app is closed then restarted, which uses the previously created dbf where presumably the ?? was saved, the application will crash immediately.

I'm seeing a lot of other spurious crashes in my code now as well, all appear to bexbrowse related, in places in my code that were completely solid until the 15.08 release (either the original or the 2nd release, but the 2nd release is less stable than the first).

I have neither time nor inclination to debug this, just sharing my experience. I've just removed 15.08 from my system and rolled back to 15.07, there are too many weird crashes to deal with. I'll try again when you folks get this correct and stable.

This is on MSVC 2013, both 32 and 64 bit.

Robb
User avatar
rhlawek
 
Posts: 194
Joined: Sun Jul 22, 2012 7:01 pm

Re: FWH 15.08 UNICODE support: Beginnings

Postby Antonio Linares » Wed Sep 16, 2015 8:17 am

Robb,

We do appreciate if you could provide us some examples to test here where it crashes.

We are working hard on unicode support and we really need all your feedback, many thanks
regards, saludos

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 66 guests