Edit control unicode support

Post Reply
Roberto Parisi
Posts: 116
Joined: Thu Oct 13, 2005 5:14 pm
Location: Italy

Edit control unicode support

Post 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.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Roberto,

No, we don't support them yet
regards, saludos

Antonio Linares
www.fivetechsoft.com
Roberto Parisi
Posts: 116
Joined: Thu Oct 13, 2005 5:14 pm
Location: Italy

Edit control unicode support

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
Roberto Parisi
Posts: 116
Joined: Thu Oct 13, 2005 5:14 pm
Location: Italy

Edit control unicode support

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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)
Last edited by Antonio Linares on Tue Aug 28, 2007 10:21 pm, edited 1 time in total.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Roberto Parisi
Posts: 116
Joined: Thu Oct 13, 2005 5:14 pm
Location: Italy

Edit control unicode support

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Roberto,

Some interesting readings:

http://www.fileformat.info/tip/microsof ... nicode.htm
regards, saludos

Antonio Linares
www.fivetechsoft.com
Roberto Parisi
Posts: 116
Joined: Thu Oct 13, 2005 5:14 pm
Location: Italy

Edit control unicode support

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Roberto,

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

Antonio Linares
www.fivetechsoft.com
Roberto Parisi
Posts: 116
Joined: Thu Oct 13, 2005 5:14 pm
Location: Italy

Edit control unicode support

Post 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
Roberto Parisi
Posts: 116
Joined: Thu Oct 13, 2005 5:14 pm
Location: Italy

Edit control unicode support

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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