Entering Character from keyboard
Moderator: Rathinagiri
Entering Character from keyboard
Dear All,
In some editor if we press Alt+065, it display 'A', cause the ascii for 'A' is 65.
How to get the character of unicode 0x2500 to be displayed ?
TIA
best rgds,
chang
In some editor if we press Alt+065, it display 'A', cause the ascii for 'A' is 65.
How to get the character of unicode 0x2500 to be displayed ?
TIA
best rgds,
chang
Just Hmg It !
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Entering Character from keyboard
Hi Chang,
You always with new ideas...
Try this:I found this Box Drawing unicode table, could it be useful: http://www.ssec.wisc.edu/~tomw/java/unicode.html#x2500
And here several unicodes tables:
http://www.ssec.wisc.edu/~tomw/java/unicode.html
UNICODE is wonderful !!! P.S.: Dear Chang, IMHO the appropriated title of this topic would it be: "How to display a unicode character". What do you think ?
You always with new ideas...
Try this:
Code: Select all
#include <hmg.ch>
Function Main()
// SET CODEPAGE TO UNICODE
MsgInfo(hb_UChar(0x250C)+Replicate(hb_UChar(0x2500),20)+hb_UChar(0x2510)+CRLF+; // Simple
hb_UChar(0x2502)+Replicate(hb_UChar(0x2003),20)+hb_UChar(0x2502)+CRLF+;
hb_UChar(0x2514)+Replicate(hb_UChar(0x2500),20)+hb_UChar(0x2518)+CRLF+;
hb_UChar(0x250F)+Replicate(hb_UChar(0x2501),20)+hb_UChar(0x2513)+CRLF+; // Heavy
hb_UChar(0x2503)+Replicate(hb_UChar(0x2003),20)+hb_UChar(0x2503)+CRLF+;
hb_UChar(0x2517)+Replicate(hb_UChar(0x2501),20)+hb_UChar(0x251B)+CRLF+;
hb_UChar(0x2554)+Replicate(hb_UChar(0x2550),20)+hb_UChar(0x2557)+CRLF+; // Double
hb_UChar(0x2551)+Replicate(hb_UChar(0x2007),20)+hb_UChar(0x2551)+CRLF+;
hb_UChar(0x255A)+Replicate(hb_UChar(0x2550),20)+hb_UChar(0x255D)+CRLF+;
hb_UChar(0x2504)+Replicate(hb_UChar(0x2504),20)+hb_UChar(0x2504)+CRLF+; // Dash
hb_UChar(0x250A)+Replicate(hb_UChar(0x2592),20)+hb_UChar(0x250A)+CRLF+;
hb_UChar(0x2504)+Replicate(hb_UChar(0x2504),20)+hb_UChar(0x2504)+CRLF+;
hb_UChar(0x2663)+hb_UChar(0x2752)+hb_UChar(0x2713),"Box Drawing")
Return Nil
And here several unicodes tables:
http://www.ssec.wisc.edu/~tomw/java/unicode.html
UNICODE is wonderful !!! P.S.: Dear Chang, IMHO the appropriated title of this topic would it be: "How to display a unicode character". What do you think ?
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Entering Character from keyboard
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
-
- Posts: 1275
- Joined: Tue Sep 03, 2013 4:22 am
- Location: Tecámac, México
Re: Entering Character from keyboard
+1Pablo César wrote:You always with new ideas...
Muy bien Pablo César excelente y gracias hmgchang por aportar nuevas ideas!
Saludos
Re: Entering Character from keyboard
Thks for the infos,
Mr. Pablo cesar and Mr. Javier Tovar...
I learnt computer long time ago... with ASCII and have some
text file with box characters that I entered by pressing the Alt+Num keys.
Now i use the Notepad++ to open the prg, and to enhance i choose the
harbour language, but the editor replace all the box character and i dont
get the box chars when i compile the prg.
I really wish to have a simple way or program just to convert the text ASCII/ANSI prg to
the unicode without losing any of the box characters.
It really frustated me to re-enter all the box chars again...
P.S. : I dont really know how to use SET CODEPAGE, SET LANGUAGE and UNICODE !
Mr. Pablo cesar and Mr. Javier Tovar...
I learnt computer long time ago... with ASCII and have some
text file with box characters that I entered by pressing the Alt+Num keys.
Now i use the Notepad++ to open the prg, and to enhance i choose the
harbour language, but the editor replace all the box character and i dont
get the box chars when i compile the prg.
I really wish to have a simple way or program just to convert the text ASCII/ANSI prg to
the unicode without losing any of the box characters.
It really frustated me to re-enter all the box chars again...
P.S. : I dont really know how to use SET CODEPAGE, SET LANGUAGE and UNICODE !
Just Hmg It !
Re: Entering Character from keyboard
Dear Sir,
TIA
best rgds,
Chang
Thats what I need too, but my intention is to be able to enter real unicode box-char by keyboard. The way you show me is the box-char will be displayed when the program is complied and run. I really need the unicode box-char in the editor / source code.P.S.: Dear Chang, IMHO the appropriated title of this topic would it be: "How to display a unicode character". What do you think ?
TIA
best rgds,
Chang
Just Hmg It !
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Entering Character from keyboard
hmgchang wrote: Thats what I need too, but my intention is to be able to enter real unicode box-char by keyboard. The way you show me is the box-char will be displayed when the program is complied and run. I really need the unicode box-char in the editor / source code.
Source is here.Wikipedia wrote:The RichEdit control on Microsoft Windows (as used in for example WordPad) supports the following input method: one first enters the character’s hexadecimal code (between two and six hexadecimal digits), then immediately presses Alt+x. For example, entering f1 and then pressing the combination will produce the character ñ. Unless it is six hexadecimal digits long, the code must not be preceded by any digit or letters a–f as they will be treated as part of the code to be converted. For example, entering af1 followed by Alt+x will produce ૱ (U+0AF1), but entering a0000f1 followed by Alt+x will produce añ. This also works in Microsoft Word 2002/2003 for Windows.
Notes :
1- Save as "Unicode text file" for usability as .prg source file.
2- Our HMG RicheditBox control too supports this Alt+x feature.
Viva INTERNATIONAL HMG
Re: Entering Character from keyboard
Thanks a lot Mr. Esgici...
for your instant response and....
you are very helpful...
you surely read my mind...
for your instant response and....
you are very helpful...
you surely read my mind...
Just Hmg It !
Re: Entering Character from keyboard
Dear Sirs,
I cannot use the Alt-X to enter the unicode boxchar... since Alt X is for File-Exit...
Pls advice !
TIA
rgds,
Chang
I cannot use the Alt-X to enter the unicode boxchar... since Alt X is for File-Exit...
Pls advice !
TIA
rgds,
Chang
Just Hmg It !
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Entering Character from keyboard
This feature is for only very limited editors; as explained, WordPad, MS Word, HMG Richeditbox control ...hmgchang wrote: I cannot use the Alt-X to enter the unicode boxchar... since Alt X is for File-Exit...
Which editor you are using ?
Viva INTERNATIONAL HMG