Edit control unicode support

Edit control unicode support

Postby Roberto Parisi » Mon Aug 27, 2007 3: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.
Roberto Parisi
 
Posts: 116
Joined: Thu Oct 13, 2005 5:14 pm
Location: Italy

Postby Antonio Linares » Mon Aug 27, 2007 3:03 pm

Roberto,

No, we don't support them yet
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

Edit control unicode support

Postby Roberto Parisi » Mon Aug 27, 2007 3: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
Roberto Parisi
 
Posts: 116
Joined: Thu Oct 13, 2005 5:14 pm
Location: Italy

Postby Antonio Linares » Mon Aug 27, 2007 5: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Edit control unicode support

Postby Roberto Parisi » Tue Aug 28, 2007 7: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
Roberto Parisi
 
Posts: 116
Joined: Thu Oct 13, 2005 5:14 pm
Location: Italy

Postby Antonio Linares » Tue Aug 28, 2007 8: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)
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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Edit control unicode support

Postby Roberto Parisi » Tue Aug 28, 2007 3: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
Roberto Parisi
 
Posts: 116
Joined: Thu Oct 13, 2005 5:14 pm
Location: Italy

Postby Antonio Linares » Tue Aug 28, 2007 10:34 pm

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

Edit control unicode support

Postby Roberto Parisi » Wed Aug 29, 2007 7: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
Roberto Parisi
 
Posts: 116
Joined: Thu Oct 13, 2005 5:14 pm
Location: Italy

Postby Antonio Linares » Wed Aug 29, 2007 7:41 am

Roberto,

Are you using the same font in both the notepad and testmemo ?
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

Edit control unicode support

Postby Roberto Parisi » Wed Aug 29, 2007 7: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
Roberto Parisi
 
Posts: 116
Joined: Thu Oct 13, 2005 5:14 pm
Location: Italy

Edit control unicode support

Postby Roberto Parisi » Mon Sep 03, 2007 4: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
Roberto Parisi
 
Posts: 116
Joined: Thu Oct 13, 2005 5:14 pm
Location: Italy

Postby Antonio Linares » Mon Sep 03, 2007 5: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
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 64 guests