Edit control unicode support
-
- Posts: 116
- Joined: Thu Oct 13, 2005 5:14 pm
- Location: Italy
Edit control unicode support
Does tget/tmultiget control support unicode chars?
Regards,
Roberto Parisi
I posted this msg for mistake in fwCE forum. It is related to fwh.
Regards,
Roberto Parisi
I posted this msg for mistake in fwCE forum. It is related to fwh.
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
-
- Posts: 116
- Joined: Thu Oct 13, 2005 5:14 pm
- Location: Italy
Edit control unicode support
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
If no... do you have some hints for me so I can try to integrate it in tget class?
Thx,
Roberto Parisi
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
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
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
-
- Posts: 116
- Joined: Thu Oct 13, 2005 5:14 pm
- Location: Italy
Edit control unicode support
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
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
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
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)
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.
-
- Posts: 116
- Joined: Thu Oct 13, 2005 5:14 pm
- Location: Italy
Edit control unicode support
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
Aren't east europe programmers in this forum?
Many thx in advance.
Regards,
Roberto Parisi
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
-
- Posts: 116
- Joined: Thu Oct 13, 2005 5:14 pm
- Location: Italy
Edit control unicode support
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
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
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
-
- Posts: 116
- Joined: Thu Oct 13, 2005 5:14 pm
- Location: Italy
Edit control unicode support
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
#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 5:14 pm
- Location: Italy
Edit control unicode support
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
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
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact: