FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Edit control unicode support
Posts: 116
Joined: Thu Oct 13, 2005 05:14 PM

Edit control unicode support

Posted: Mon Aug 27, 2007 03:02 PM

Does tget/tmultiget control support unicode chars?

Regards,
Roberto Parisi

I posted this msg for mistake in fwCE forum. It is related to fwh.

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Edit control unicode support

Posted: Mon Aug 27, 2007 03:03 PM

Roberto,

No, we don't support them yet

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 116
Joined: Thu Oct 13, 2005 05:14 PM

Edit control unicode support

Posted: Mon Aug 27, 2007 03:08 PM

Do you know some hints to use east europe chars? (for example other edit classes, etc.)

If no... do you have some hints for me so I can try to integrate it in tget class?

Thx,
Roberto Parisi

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Edit control unicode support

Posted: Mon Aug 27, 2007 05:51 PM

Roberto,

As FWH Class TGet uses a Harbour/xHarbour TGet object (Clipper clone), the first step would be to modify Harbour/xHarbour Class TGet to properly manage two bytes x character.

Basically the buffer of such Get objects, should be double size, and navigation methods (Right(), Left(), etc) should skip two bytes instead of one

Finally FWH Class TGet will probably work fine with it, as it just sends messages to the contained Clipper Get

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 116
Joined: Thu Oct 13, 2005 05:14 PM

Edit control unicode support

Posted: Tue Aug 28, 2007 07:55 AM

Ok Antonio, but TMultiGet class doesn't use HB/xHB TGet object.
When I paste my text in the control I see the right chars but when I loose the focus the chars are converted to normal letters.

For example I paste: ĚěČčůŮ
When I loose the focus I see: EeCcuU

Thx,
Roberto Parisi

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Edit control unicode support

Posted: Tue Aug 28, 2007 08:27 AM

Roberto,

We can't paste ĚěČčůŮ here (using samples\TestMemo.prg)

It shows EeCcuU directly. So it looks as a Windows own issue.

Also, when we talk about unicode, we mean the ability to use two bytes to store a character, instead of using a single byte (what we normally use)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 116
Joined: Thu Oct 13, 2005 05:14 PM

Edit control unicode support

Posted: Tue Aug 28, 2007 03:23 PM

I tryed until now to understand Unicode Api, but it seem more difficult to implement than I believed. I'm trying with a single byte east europe font for my controls... but again I can't see the special chars. I see special chars in notepad but not in my fwh app.

Aren't east europe programmers in this forum?

Many thx in advance.

Regards,
Roberto Parisi

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Edit control unicode support

Posted: Tue Aug 28, 2007 10:34 PM

Roberto,

Some interesting readings:

http://www.fileformat.info/tip/microsof ... nicode.htm

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 116
Joined: Thu Oct 13, 2005 05:14 PM

Edit control unicode support

Posted: Wed Aug 29, 2007 07:01 AM

Thx Antonio, but I didn't have success.

I'm now trying with an ANSI SBCS font (XSerif CE), but chars over 127 are different in testmemo and in notepad.

Regards,
Roberto Parisi

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Edit control unicode support

Posted: Wed Aug 29, 2007 07:41 AM

Roberto,

Are you using the same font in both the notepad and testmemo ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 116
Joined: Thu Oct 13, 2005 05:14 PM

Edit control unicode support

Posted: Wed Aug 29, 2007 07:53 AM

Yes. This is a simplified testmemo code:

include "FiveWin.ch"

function Main()
local oDlg, oGet, oFont, cText := ""
define font oFont name "XSerif CE" size 0, 20
define dialog oDlg title "Font test" from 0,0 to 200, 400 pixel
@0,0 get oGet var cText memo font oFont
activate dialog oDlg centered on init oGet:SetCoors(oDlg:GetCliRect())
return nil

You can download the font from: http://www.slovo.info/Download/xserce.zip

Some chars to test: ĚěČčůŮ

Regards,
Roberto Parisi

Posts: 116
Joined: Thu Oct 13, 2005 05:14 PM

Edit control unicode support

Posted: Mon Sep 03, 2007 04:16 PM

Antonio,
can I compile FWH with UNICODE #define?

When I define UNICODE I get the c compiler errror message "cannot find fwh.h".

Regards,
Roberto Parisi

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Edit control unicode support

Posted: Mon Sep 03, 2007 05:11 PM

Roberto,

In order to rebuild FiveHC.lib with UNICODE, many changes are required.

Actually only FWPPC support unicode

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion