Page 1 of 1

Edit control unicode support

Posted: Mon Aug 27, 2007 3:02 pm
by Roberto Parisi
Does tget/tmultiget control support unicode chars?

Regards,
Roberto Parisi

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

Posted: Mon Aug 27, 2007 3:03 pm
by Antonio Linares
Roberto,

No, we don't support them yet

Edit control unicode support

Posted: Mon Aug 27, 2007 3:08 pm
by Roberto Parisi
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

Posted: Mon Aug 27, 2007 5:51 pm
by Antonio Linares
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

Edit control unicode support

Posted: Tue Aug 28, 2007 7:55 am
by Roberto Parisi
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

Posted: Tue Aug 28, 2007 8:27 am
by Antonio Linares
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)

Edit control unicode support

Posted: Tue Aug 28, 2007 3:23 pm
by Roberto Parisi
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

Posted: Tue Aug 28, 2007 10:34 pm
by Antonio Linares
Roberto,

Some interesting readings:

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

Edit control unicode support

Posted: Wed Aug 29, 2007 7:01 am
by Roberto Parisi
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

Posted: Wed Aug 29, 2007 7:41 am
by Antonio Linares
Roberto,

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

Edit control unicode support

Posted: Wed Aug 29, 2007 7:53 am
by Roberto Parisi
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

Edit control unicode support

Posted: Mon Sep 03, 2007 4:16 pm
by Roberto Parisi
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

Posted: Mon Sep 03, 2007 5:11 pm
by Antonio Linares
Roberto,

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

Actually only FWPPC support unicode