txbrowse/twbrowse support 2 bytes language word /char ?

Post Reply
ShumingWang
Posts: 454
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

txbrowse/twbrowse support 2 bytes language word /char ?

Post by ShumingWang »

Hi,
How could xbrowse/twbrowse suport 2 bytes language word as 1 char ?
I know lfastedit:=.t., method keychar() can transmit a 1 byte char as 0-9,a-Z into tget . How could transmit 2 bytes word input into tget?

Thanks !
Shuming Wang
ShumingWang
Posts: 454
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Post by ShumingWang »

On DOS,we can use :

while nextkey()>0
cstr+=char(nextkey())
inkey()
end

keyboard cstr

To get the keyboard buffer, and transport into current oget.

Now, on windows , nextkey() not work.

Is there any function to get the keyboard buffer ?

http://docs.mandragor.org/files/Common_ ... ex006.html

Might offer a way.

Thanks !

Shuming Wang
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Shuming,

RE: keyboard buffer

There are lots of answers to your question. What exactly are you trying to do?

James
ShumingWang
Posts: 454
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Post by ShumingWang »

James
I want xbrowse/wbrowse/txbrowse edit as excel and support Chinese 2 bytes word.
browse--keychar()--col:edit()
For example:
browse as
name descrip tel
Bob computer 920888888
张三 程序员 023999999
李四 系统分析师 139999999


When browse cursor at row 2,col3 , and type 9, then browse call keychar() method ,then call oCol:Edit( nKey ) and create tget and the pre typed chr(9) will become the first char on the get as 9
when browser cursor at row 2 ,col2, and type Chinese words 程序员,then oget should display 程序员,but oCol:Edit( nKey ) only transport the first char, a Chinse word contianed 2 bytes, sometimes many bytes.
If we can get the keyboard buffer and do a keybord command , then transport all the words into the oget .

Regards !
Shuming Wang
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Shuming,

>If we can get the keyboard buffer and do a keybord command , then transport all the words into the oget .

I am guessing that it is a whole lot more complicated than that.

I have no experience with Chinese (or any language other than English) so I can't offer much help. There is a data, nLastKey, that contains the last keystroke typed, but I don't know if that will help. nLastkey is part of the TWindow class so all controls inherit it.

I don't quite understand when you say a Chinese word 3 characters long is entered, but only the first character ends up in the Get. Do you mean that three keystrokes are used to create this word, or?

Perhaps someone with other language experience can help.

James
User avatar
Ugo
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Post by Ugo »

James Bott wrote:I don't quite understand when you say a Chinese word 3 characters long is entered, but only the first character ends up in the Get. Do you mean that three keystrokes are used to create this word, or?
James,
I have the same problem!
see:
http://fivetechsoft.com/forums/viewtopi ... 8186#28186
do you remember?

Shuming,
can you test the sample and report here?
Is the same problem?

Sorry for my bad english!
Ciao, best regards,
Ugo
ShumingWang
Posts: 454
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Post by ShumingWang »

Ugo,James,
Yes! the click, copy,paste,Ctrl+V of tget now works well.
Chinse input might be some words at the same time , can take as some chars at the same time .
Thanks!
Shuming Wang
User avatar
Ugo
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Post by Ugo »

ShumingWang wrote:Yes! the click, copy,paste,Ctrl+V of tget now works well.
Shuming,
have you tested my sample?
You can find the sample at
http://fivetechsoft.com/forums/viewtopi ... 51&start=0
I Tested now and do not work!!
I can see the special characters after Ctrl+V but when exit from the control the char change in "?"
in the case of use the clipboard the paste button, insert directly the "?" char(s).

Now I use FWHX 7.04, xHarbour 0.99.71 from CVS and Vista Business.

The new version of FWH change this situation?
Ciao, best regards,
Ugo
ShumingWang
Posts: 454
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Post by ShumingWang »

Ugo,
Mine's is fwh2.5 .
Shuming Wang
Post Reply