A visual foxpro CHARMAP

Published on by Yousfi Benameur


I never seen a charmap made with Visual foxpro.
the windows utility charmap.exe can run easily from vfp as follow
Run/n charmap.exe  &&this utility resides in windows system32

it figures all chars in relation with any font even unicode.
and that's the problem:
the unicode chars cannot be typed in vfp surface because not supported.the vfp supported  chars go from 0-255 and can be reached with the chr() function.
the other chars (unicode) are no longer in vfp.

i try by this first  code to use a vfp olebrowser to figure that and draw a great quantity of unicode chars (more 19330).
i gathered all these chars in a downloadable txt file (download first fom the link below before running this code).
there is 3 representations of any unicode char(contains also ANSI chars)
        -the unicode representation: U+(hexadecimal char)
	-the hexadecimal representation: 0x... or x....
	-the decimal representation.
    -And others (octal...)
the combo provides strings to search with the classic sql commands.
can also search any string  on 2 fields of current cursor.
the result can be viewed with IE11 ( as grid view or filtered view).only the records filtered are viewed.Use reset button to delete the filter.
the font used for view is Arial (maybe the greatest font in windows and its unicode one).
in the vfp olebrowser can use contextuel menu to copy ,print ...the pointed char (or the full page)..
In grid can use the mousedown to select a char or can scroll with mousedown/mouseup to see chars in browser.

can build a project, add a config.fpw and compile a standalone exe
Of course can complete the txt source file with another unicode chars (there is at least 65536).

note:if work on whole cursor (heavy) that slow.better select a string (ex: arabic,operator,cyrilic....) to make operation fast.
can move the cursor on grid with up/down arrow or scan to see chars in view.
ref:http://unicode.org/charts/


 

Click on code to select [then copy] -click outside to deselect


*1*
*requires the txt source file yunicodechars.txt (to download below)

If !_vfp.StartMode=0
    On Shutdown Quit
Endi
_Screen.WindowState=1

Publi yform
yform=Newobject("yunicodechars")
yform.Show
Read Events
Retu
*
Define Class yunicodechars As Form
	BorderStyle = 3
	Height = 476
	Width = 888
	ShowWindow = 2
	AutoCenter = .T.
	Caption = "?"
	ClipControls = .T.
	Recc = 0
	Name = "Form1"

	Add Object grid1 As Grid With ;
		Anchor = 15, ;
		Height = 396, ;
		Left = 12, ;
		ReadOnly = .T., ;
		Top = 12, ;
		Width = 492, ;
		Name = "Grid1"

	Add Object ycont  As ycont With ;
		Top = 144, ;
		Left = 571, ;
		Height = 264, ;
		Width = 253, ;
		Anchor = 672, ;
		Name = "ycont"

	Add Object label2 As Label With ;
		FontSize = 40, ;
		Anchor = 768, ;
		Alignment = 2, ;
		Caption = "", ;
		Height = 60, ;
		Left = 577, ;
		Top = 12, ;
		Width = 241, ;
		ForeColor = Rgb(128,0,64), ;
		BackColor = Rgb(255,255,128), ;
		Name = "Label2"

	Add Object label1 As Label With ;
		FontSize = 40, ;
		Anchor = 768, ;
		Alignment = 2, ;
		Caption = "", ;
		Height = 60, ;
		Left = 580, ;
		Top = 76, ;
		Width = 241, ;
		ForeColor = Rgb(128,0,255), ;
		BackColor = Rgb(255,255,128), ;
		Name = "Label1"

	Add Object command1 As CommandButton With ;
		Top = 437, ;
		Left = 583, ;
		Height = 25, ;
		Width = 120, ;
		FontBold = .T., ;
		Anchor = 768, ;
		Caption = "Scan/ESC to stop", ;
		MousePointer = 15, ;
		SpecialEffect = 2, ;
		BackColor = Rgb(128,255,0), ;
		Name = "Command1"

	Add Object command2 As CommandButton With ;
		Top = 438, ;
		Left = 236, ;
		Height = 27, ;
		Width = 49, ;
		FontBold = .T., ;
		Anchor = 768, ;
		Caption = "Reset", ;
		ToolTipText = "Reset to initial cursor", ;
		BackColor = Rgb(128,255,0), ;
		Name = "Command2"

	Add Object command3 As CommandButton With ;
		Top = 438, ;
		Left = 290, ;
		Height = 27, ;
		Width = 72, ;
		FontBold = .T., ;
		Anchor = 768, ;
		Caption = "One view", ;
		ForeColor = Rgb(255,0,0), ;
		BackColor = Rgb(128,255,0), ;
		Name = "Command3"

	Add Object label3 As Label With ;
		FontBold = .T., ;
		FontSize = 12, ;
		Anchor = 768, ;
		Alignment = 2, ;
		Caption = "", ;
		Height = 27, ;
		Left = 428, ;
		Top = 437, ;
		Width = 144, ;
		BackColor = Rgb(255,255,128), ;
		Name = "Label3"

	Add Object combo1 As ComboBox With ;
		FontBold = .T., ;
		Anchor = 768, ;
		Height = 27, ;
		Left = 0, ;
		Top = 437, ;
		Width = 108, ;
		Name = "Combo1"

	Add Object command4 As CommandButton With ;
		Top = 439, ;
		Left = 364, ;
		Height = 25, ;
		Width = 60, ;
		FontBold = .T., ;
		Anchor = 768, ;
		Caption = "grid View", ;
		ForeColor = Rgb(0,0,255), ;
		BackColor = Rgb(128,255,0), ;
		Name = "Command4"

	Add Object command5 As CommandButton With ;
		Top = 439, ;
		Left = 108, ;
		Height = 25, ;
		Width = 120, ;
		FontBold = .T., ;
		Anchor = 768, ;
		Caption = "Any string search", ;
		BackColor = Rgb(128,255,0), ;
		Name = "Command5"

	Add Object yhelp As Label With ;
		AutoSize = .T., ;
		FontBold = .T., ;
		FontSize = 32, ;
		Anchor = 768, ;
		BackStyle = 0, ;
		Caption = "?", ;
		Height = 54, ;
		Left = 840, ;
		MousePointer = 15, ;
		Top = 0, ;
		Width = 28, ;
		ForeColor = Rgb(128,0,64), ;
		Name = "yHelp"

	Procedure my
		Lparameters nButton, nShift, nXCoord, nYCoord
		Thisform.label2.Caption=""
		Thisform.label2.Caption=Strconv(xunicode,2)
		Thisform.label1.Caption="U+"+Substr(xunicode,2)
		Thisform.ycont.obrowser.Document.body.innerhtml='<center><p style="font_family:arial;font-size:120px;">&#'+Allt(xunicode)+"; </p></center>"
		Thisform.ycont.obrowser.Document.body.Scroll="no"
		Thisform.ycont.obrowser.SetFocus
		Thisform.label3.Caption=Trans(Recno())+'/'+Trans(Thisform.Recc)
        thisform.grid1.setfocus
	Endproc

	Procedure ygrid

		With Thisform.grid1
			.RecordSource=""
			.RecordSource=Alias()
			.RecordSourceType=1
			.GridLines=0
			.DeleteMark=.F.
			.FontSize=11
			.FontBold=.T.
			.column1.Width=100
			.column2.Width=450
			.SetAll("DynamicBackColor","IIF(MOD(RECNO( ), 2)=0, RGB(255,255,255) , RGB(210,255,166))", "Column")
			.Refresh
			Locate
		Endwith
		Sele Alias()
		Scan
			Bindevent(Thisform.grid1.column1.text1,"mousedown",Thisform,"my")
		Endscan

		Locate
		Count To Thisform.Recc For ! Deleted()
		Locate
		Thisform.label3.Caption=Trans(Recno())+'/'+Trans(Thisform.Recc)
		Thisform.Caption=Trans(Thisform.Recc)+" unicode chars   -   up arrow/down arrow to activate chars interactively."
	Endproc

	Procedure ymessagebox
		Lparameters xtext,xtitle
		#Define MB_ICONINFORMATION 0x00000040
		#Define MB_OK 0x00000000
		#Define MB_APPLMODAL 0x00000000
		#Define  MB_DEFBUTTON1 0x00000000

		Declare Integer MessageBox In user32 As MessageBoxA ;
			INTEGER HWnd,;
			STRING  lpText,;
			STRING  lpCaption,;
			INTEGER wType
		*buttons
		#Define MB_ABORTRETRYIGNORE 0x00000002
		#Define MB_CANCELTRYCONTINUE 0x00000006
		#Define MB_HELP 0x00004000

		#Define MB_OKCANCEL 0x00000001
		#Define MB_RETRYCANCEL 0x00000005
		#Define MB_YESNO  0x00000004
		#Define MB_YESNOCANCEL 0x00000003

		*Icons
		#Define  MB_ICONEXCLAMATION 0x00000030
		#Define MB_ICONWARNING 0x00000030

		#Define MB_ICONASTERISK 0x00000040
		#Define MB_ICONQUESTION 0x00000020
		#Define MB_ICONSTOP 0x00000010
		#Define MB_ICONERROR 0x00000010
		#Define MB_ICONHAND  0x00000010

		*To indicate the default button, specify one of the following values.

		#Define MB_DEFBUTTON2 0x00000100
		#Define MB_DEFBUTTON3 0x00000200
		#Define MB_DEFBUTTON4 0x00000300

		*To indicate the modality of the dialog box, specify one of the following values.

		#Define MB_SYSTEMMODAL 0x00001000
		#Define MB_TASKMODAL 0x00002000

		*To specify other options, use one or more of the following values.
		#Define MB_DEFAULT_DESKTOP_ONLY 0x00020000
		#Define MB_RIGHT 0x00080000
		#Define MB_RTLREADING  0x00100000
		#Define MB_SETFOREGROUND  0x00010000
		#Define MB_TOPMOST  0x00040000
		#Define MB_SERVICE_NOTIFICATION 0x00200000

		*Return code
		#Define IDABORT 3
		#Define IDCANCEL 2
		#Define IDCONTINUE 11
		#Define IDIGNORE 5
		#Define IDNO 7
		#Define IDOK 1
		#Define IDRETRY 4
		#Define IDTRYAGAIN 10
		#Define IDYES 6
		MessageBoxA(_vfp.HWnd,xtext,xtitle,MB_APPLMODAL+MB_OK +MB_ICONINFORMATION +MB_DEFBUTTON1 )

	Endproc

	Procedure Init
		Publi m.yrep
		m.yrep=Addbs(Justpath(Sys(16,1)))
		Set Defa To (yrep)

		If !File("yunicodechars.txt")
			Messagebox("yunicodechars.txt must exist mandatory!...cancelling",0+32+4096,"Error",1200)
			Return .F.
		Endi


		If ! File ("yunicode.dbf")
			Crea Table yUnicode (xunicode c(7),lib c(90))
		Else
			Use yUnicode Exclusive
			Zap
		Endi

		Appe From yunicodechars.txt Sdf
		Dele Reco 1
		Dele All For Empty(xunicode)
		Scan
			Repl xunicode With Strtran(xunicode,"'","")
			Repl xunicode With Strtran(xunicode,":","")
			Repl xunicode With "x"+xunicode
			Repl lib With Strtran(lib,"',","'")
		Endscan
		Go Botto
		Delete
		Use In Select("yunicode")


		Sele * From yUnicode.Dbf Where !Deleted() Into Cursor ycurs

		Sele ycurs
		Locate
		*brow
		Thisform.ygrid()
	Endproc

	Procedure Load
		Close Data All
		Set Safe Off
		Set Exact On
		Set Esca Off
		Set Deleted On
	Endproc

	Procedure Activate
		With Thisform.grid1
			.SetFocus
			.column1.text1.Click
		Endwith
	Endproc

	Procedure Destroy
		Close Data All
		Clea Events
	Endproc

	Procedure grid1.AfterRowColChange
		Lparameters nColIndex
		Thisform.my(1)
	Endproc


	Procedure command1.Click
		Sele Alias()
		Local m.xr
		m.xr=Recno()
		Set Curs Off
		Keyboard " " Clear
		Scan For Recno()>m.xr
			Thisform.grid1.SetFocus
			Thisform.grid1.column1.text1.Click
			Inke(0.3)
			If Lastkey()=27
				Exit
			Endi
		Endscan
		Keyboard " " Clear
		Set Curs On
	Endproc

	Procedure command2.Click
		Sele ycurs  &&initial cursor
		Thisform.ygrid()
	Endproc

	Procedure command3.Click
		Sele Alias()   && current cursor
		Count To xfilt
		Local m.xx
		m.xx="<table>"
		Scan
			m.xx=m.xx+"<tr><TD style='margin:20px;font-size:48px;width:100px;'>&#"+Allt(xunicode)+"</td><td style='font-size:24px;'>"+Allt(xunicode)+"</TD><td>"+Allt(lib)+"</td></tr>"+Chr(13)
		Endscan
		TEXT to m.ycss noshow
		<style>
		table, th, td {
		    border: 1px solid black;
		}
		table {

		    display: table;
		    border: 1px solid black;
		    border-collapse: separate;
		    border-spacing: 1px;
		    border-color: red;
		    bgcolor:yellow;

		}
		</style>
		ENDTEXT


		Set Textmerge On To (m.yrep+"yview.html") Noshow
		\<!DOCTYPE html>
		\<html>
		\<head>
		\<body bgcolor="#FFFFB9">
		\<<ycss>>
		\<center>
		\</head>
		\<h2 style="color:red;"> [<<thisform.combo1.value>>] - <<trans(xfilt)>>/19340 unicode chars</h2>
		\ <li  margin-left="50px"><<m.xx>> </li>
		\</center>
		\</table>
		Set Textmerge Off
		Set Textmerge To

		=yview()
	Endproc

	Procedure combo1.Click
		Sele * From yUnicode.Dbf Where  Lower(Allt(This.Value)) $ Lower(Allt(lib)) Or  Lower(Allt(This.Value)) $ Lower(Allt(xunicode)) Into Cursor zcurs Readwrite
		Sele zcurs
		Thisform.ygrid()


	Endproc

	Procedure combo1.Init
		Local m.myvar
		TEXT to m.myvar noshow
		Latin
IPA
Spacing
Combining
Greek
Cyrillic
Armenian
Hebrew
Arabic
Syriac
Thaana
Devanagari
Bengali
Gurmukhi
Gujarati
Oriya
Tamil
Telugu
Kannada
Malayalam
Sinhala
Thai
Lao
Tibetan
Myanmar
Georgian
Hangul Jamo
Ethiopic
Cherokee
Canadian
Syllabics
Ogham
Runic
Khmer
Mongolian
Punctuation
Superscripts
Subscripts
Currency
Combining
Letterlike
Number
Arrows
Operators
Math
Technical
Pictures
Optical
Enclosed
Box Drawing
Block
Shapes
Symbols
Dingbats
Braille
Kangxi Radicals
Ideographic
Hiragana
Katakana
Bopomofo
Hangul Compatibility Jamo
Kanbun
Bopomofo
CJK
Yi Syllables
Yi Radicals
Hangul Syllables
Surrogates
Private
CJK
Alphabetic
Marks
Form Variants
Halfwidth and Fullwidth Forms
Specials
		ENDTEXT

		With This
			For i=1 To Memlines(m.myvar)
				.AddItem(Mline(m.myvar,i))
			Endfor

			.ListIndex=1
			.Style=2
		Endwith
	Endproc

	Procedure command4.Click
		Sele Alias()   && current cursor
		Count To xfilt
		Locate
		Local m.xx,i
		m.xx="<table><tr>"
		i=1
		Do While Not Eof()
			m.xx=m.xx+"<TD style='margin:20px;font-size:20px;font-bold;width:32px;'>&#"+Allt(xunicode)+Chr(13)+'<p style="color:maroon;font-size:16px;"  title='+   Allt(lib)+"'>"+Allt(xunicode)+"</p></td>"+Chr(13)
			i=i+1
			If Not Eof()
				Skip
			Else
				Exit
			Endi

			If i>17 &&20 objects by row
				m.xx=m.xx+"</tr>"+Chr(13)
				i=1
				Loop
			Endi
		Enddo

		TEXT to m.ycss noshow
		<style>
		table, th, td {
		    border: 1px solid black;
		}
		table {

		    display: table;
		    border: 1px solid black;
		    border-collapse: separate;
		    border-spacing: 1px;
			}
		</style>
		ENDTEXT

		Set Textmerge On To (m.yrep+"yview.html") Noshow
		\<!DOCTYPE html>
		\<html>
		\<head>
		\<body bgcolor="#FFFFB9">
		\<<ycss>>
		\<center>
		\</head>
		\<h2 style="color:red;">[<<thisform.combo1.value>>] - <<trans(xfilt)>>/19340 unicode chars</h2>
		\ <div  margin-left="50px"><<m.xx>> </div>
		\</center>
		\</table>
		Set Textmerge Off
		Set Textmerge To

		=yview()
	Endproc

	Procedure command5.Click
		Local m.ystr
		m.ystr=Inputbox("Search a string in unicode char source.","","0659")
		If Empty(m.ystr)
			Return .F.
		Endi

		Sele * From yUnicode.Dbf Where  Lower(Allt(m.ystr)) $ Lower(Allt(lib)) Or  Lower(Allt(m.ystr)) $ Lower(Allt(xunicode)) Into Cursor zcurs Readwrite
		Sele zcurs
		Thisform.ygrid()
	Endproc

	Procedure yhelp.Click
		Local m.myvar
		TEXT to m.myvar noshow
I never seen a charmap made with Visual foxpro.
the windows utility charmap.exe can run easily from vfp as follow
Run/n charmap.exe

it figures all chars in relation with any font even unicode.
and thats the problem:
the unicode chars cannot be typed in vfp surface because not supported.the vfp chars go from 0-255 and can be reached with the chr() function
the other chars (unicode) are no longer in vfp.

i try by this first  code to use a vfp olebrowser to figure that and draw a great quantity of unicode chars (more 19330).
i gathered all these chars in a downloadable txt file (download first fom the link below before running this code).
there is 3 representations of any unicode char(contains also ANSI chars)
     -the unicode representation: U+(hexadecimal char)
    -the hexadecimal representation: 0x... or x....
	-the decimal representation.
    -And others (octal...)
the combo provides strings to search with the classic sql commands
can also search any string  on 2 fields of current cursor.
the result can be viewed with IE11 ( as grid view or filtered view).only the records filtered are viewed.Use reset button to delete the filter(set filt to).
the font used for view is Arial (maybe the greatest font in windows and its unicode one).
in the vfp olebrowser can use contextuel menu to copy the pointed char.
In grid can use the mousedown to select a char or can scroll with mousedown/mouseup to see chars in browser.

can build a project, add a config.fpw and compile a standalone exe
Of cource can complete the txt source file with another unicode chars.

note:if work on whole cursor (heavy) that slow.better select a string (ex: arabic,operator,cyrilic....) to make operation fast.
can move the cursor on grid with up/down arrow or scan to see chars in view.
		ENDTEXT
		Thisform.ymessagebox(m.myvar,"Summary help")
	Endproc

Enddefine
*
*-- EndDefine: yunicodechars

*this container class hides the olebrowser borders(appear on executable only...)
Define Class ycont As Container
	Top = 144
	Left = 576
	Width = 252
	Height = 252
	BackStyle = 1
	BorderWidth = 0
	Name = "ycont"

	Add Object obrowser As OleControl With ;
		oleclass="shell.explorer.2", ;
		Top = -3, ;
		Left = -3, ;
		Height = 264+3, ;
		Width = 253+3, ;
		Anchor = 672, ;
		Name = "oBrowser"

	Procedure obrowser.Init
		* <meta charset="UTF-8">
		Set Safe Off
		This.Navigate("about:blank")
		This.Document.charset="UTF-8"
	Endproc

Enddefine
*
*-- EndDefine: ycont

Function yview()
	Local m.oo
	m.oo=Newobject("hyperlink")
	m.oo.NavigateTo(m.yrep+"yview.html")
	m.oo=Null
	Release m.oo
Endfunc


A visual foxpro CHARMAP
A visual foxpro CHARMAP
A visual foxpro CHARMAP
A visual foxpro CHARMAP

Click on code to select [then copy] -click outside to deselect


this second code dont use any prerecquired resource but build a complete table of representation chars from 0 to 65536 based on
decimal values (simply 0 to 65536).
Each Unicode character has a ID. It is a integer, starting at 0. This number is called the character's codepoint.
in the preview, each char have a complet tooltip with decima,html,hex and octal code.
There are many encoding systems. The most popular encoding systems used today are:
    ASCII. For English. Most widely used before year 2000.
    UTF-8 of Unicode (used in Linux by default, and much of the Internet)
    UTF-16 of Unicode (used by Microsoft Windows and Mac OS X's file systems, Java programing language, …)

Unicode's character set includes ALL human language's written symbols. It includes the tens of thousands Chinese characters, math symbols, as well as characters of dead languages, such as Egyptian Hieroglyph.

For making this to work, the "charset" of the Web page should be simply set to Unicode by this html  meta tag:
<meta http-equiv="content-type" content="text/html; charset=utf-8" />

Unicode allows for 17 planes, each of 65,536 possible characters (or 'code points'). This gives a total of 1,114,112 possible characters. At present, only about 10% of this space has been allocated.the rest is yet empty.
the char representation depend on formatting as
-decimal (base 10) 0,12,3,....65536....)
-HTML : its "&#"+decimal .
-hexadecimal (obtained for ex by conversion decimal to hex)
-octal (base 8) (obtained by conversion decimal to octal here).
can convert from a based char to another as pointed in code (see the built cursor).
note: to preserve speed can choose a range of 3000 chars with the 2 spinners on form.


Click on code to select [then copy] -click outside to deselect


*2*

Set Safe Off
Set Esca On

Publi yform
yform=Newobject("ychars")
yform.Show
Read Events
Retu
*
Define Class ychars As Form
Height = 534
Width = 952
ShowWindow = 2
ShowTips = .T.
AutoCenter = .T.
Caption = "Characters representation table (65536 chars)"
BackColor = Rgb(212,208,200)
Name = "Form1"

Add Object spinner1 As Spinner With ;
    Anchor = 768, ;
	Height = 24, ;
	KeyboardHighValue = 65536, ;
	KeyboardLowValue = 0, ;
	Left = 6, ;
	SpinnerHighValue = 65536.00, ;
	SpinnerLowValue =   0.00, ;
	ToolTipText = "0-65335", ;
	Top = 3, ;
	Width = 121, ;
	Value = 0, ;
	Name = "Spinner1"

Add Object spinner2 As Spinner With ;
	Anchor = 768, ;
	Height = 24, ;
	KeyboardHighValue = 65535, ;
	KeyboardLowValue = 0, ;
	Left = 12, ;
	SpinnerHighValue = 65535.00, ;
	SpinnerLowValue =   0.00, ;
	ToolTipText = "0-65335", ;
	Top = 48, ;
	Width = 121, ;
	Value = 3000, ;
	Name = "Spinner2"

Add Object command1 As CommandButton With ;
	Top = 84, ;
	Left = 24, ;
	Height = 37, ;
	Width = 85, ;
	FontBold = .T., ;
	FontSize = 10, ;
	Anchor = 768, ;
	Caption = "Build", ;
	MousePointer = 15, ;
	BackColor = Rgb(128,255,0), ;
	Name = "Command1"

Add Object olecontrol1 As OleControl With ;
	oleclass="shell.explorer.2", ;
	Top = 0, ;
	Left = 226, ;
	Height = 492, ;
	Width = 721, ;
	Anchor = 15, ;
	Name = "Olecontrol1"

Add Object text1 As TextBox With ;
	FontBold = .T., ;
	Anchor = 768, ;
	Alignment = 3, ;
	Value = 0, ;
	Height = 25, ;
	Left = 24, ;
	Top = 453, ;
	Width = 121, ;
	Name = "Text1"

Add Object olecontrol2 As OleControl With ;
	oleclass="shell.explorer.2", ;
	Top = 229, ;
	Left = 3, ;
	Height = 204, ;
	Width = 210, ;
	Anchor = 768, ;
	Name = "Olecontrol2"

Add Object command2 As CommandButton With ;
	Top = 501, ;
	Left = 24, ;
	Height = 26, ;
	Width = 121, ;
	FontBold = .T., ;
	Anchor = 768, ;
	Caption = "Anim (Esc to stop)", ;
	MousePointer = 15, ;
	Name = "Command2"

Add Object label1 As Label With ;
	AutoSize = .F., ;
	Anchor = 768, ;
	Alignment = 2, ;
	BackStyle = 1, ;
	BorderStyle = 0, ;
	Caption = "Capture", ;
	Height = 17, ;
	Left = 30, ;
	MousePointer = 15, ;
	Top = 481, ;
	Width = 114, ;
	BackColor = Rgb(255,255,128), ;
	Name = "Label1"

Add Object image1 As Image With ;
	Anchor = 768, ;
	Picture = Home(1)+"graphics\icons\win95\explorer.ico", ;
	BackStyle = 0, ;
	Height = 32, ;
	Left = 156, ;
	MousePointer = 15, ;
	Top = 471, ;
	Width = 32, ;
	ToolTipText = "Explorer", ;
	Name = "Image1"

Add Object label2 As Label With ;
	AutoSize = .T., ;
	FontBold = .T., ;
	FontSize = 12, ;
	Anchor = 768, ;
	Alignment = 2, ;
	Caption = "Selected  CharsTable", ;
	Height = 22, ;
	Left = 406, ;
	MousePointer = 15, ;
	Top = 510, ;
	Width = 164, ;
	BackColor = Rgb(128,255,0), ;
	Name = "Label2"

Add Object label3 As Label With ;
	AutoSize = .T., ;
	FontBold = .T., ;
	FontSize = 12, ;
	Anchor = 768, ;
	Alignment = 2, ;
	Caption = "Export table to txt", ;
	Height = 22, ;
	Left = 657, ;
	MousePointer = 15, ;
	Top = 508, ;
	Width = 136, ;
	BackColor = Rgb(255,255,128), ;
	Name = "Label3"

Add Object yhelp As Label With ;
        Anchor=768, ;
		AutoSize = .T., ;
		FontBold = .T., ;
		FontSize = 24, ;
		Anchor = 768, ;
		BackStyle = 0, ;
		Caption = "?", ;
		Height = 54, ;
		Left = 800+25, ;
		MousePointer = 15, ;
		Top = 495, ;
		Width = 28, ;
		ForeColor = Rgb(128,0,64), ;
		Name = "yHelp"	

Procedure ybuild
	Lparameters xmin,xmax
	Local m.x,m.ii
	Create Cursor ycurs (Deci c(10),codeHTML c(10),hex c(10),octal c(15))
	m.he="<br><tr><td>"+Spac(2)+"</td>"
	For i=0 To 19
		If i=0
			m.he=m.he+"<td>00</td>"
		Else

			If Between(i,1,9)
				r="0"+Trans(i)
			Else
				r=Trans(i)
			Endi
			m.he=m.he+"<td style='font-bold;'>"+r+"</td>"
		Endi

	Endfor
	m.he=m.he+"</tr>"

	m.x="<center><table>"
	m.x=m.x+m.he
	j=1
	k=xmin
	w=1
	Max=xmax    &&65536
	For i=xmin To Max   &&65536
		*if i=65021    &&too long/cell
		*i=i+1
		*loop
		*endi

		If j=1
			m.x=m.x+ "<tr><td style='font-bold;'>"+Trans(k)+"</td>"
		Endi

		Insert Into ycurs Values (Trans(i),"&#"+Trans(i),Transform(i, "@0"),Thisform.yoct(i,8))

		m.u=" title=' #"+Allt(Deci)+" -unicode="+hex  +" -Html:& "+Substr(Allt(codeHTML),2)+"-Octal:"+Trans(octal) +"'"
		m.x=m.x+  '<td  onclick="alert('+"'Decimal="+Trans(Deci,"99999")+"-Unicode="+hex+" -Html:"+"& # "+Trans(Deci,"99999")+" -octal:"+Trans(octal)+[')"; style="color:purple;font-size:28px;font-bold;"]+m.u +">"+Allt(codeHTML)+Chr(13) +"</td>"+Chr(13)

		j=j+1
		If j>20
			w=w+1
			j=1
			m.x=m.x+"</tr>"+Chr(13)+"<tr>"
			k=k+20
		Endi

		If k>Max
			m.x=m.x+"</tr></table></center>"
			Exit
		Endi

		If w>25
			w=0
			m.x=m.x+"</tr></table></center>"
			m.x=m.x+"<br><br>"+"<center><table><tr>"
			m.x=m.x +m.he
		Endi
	Endfor
	*brow nowait
	Local m.myvar
	TEXT to m.myvar textmerge noshow
	<!DOCTYPE html>
	<html>
	<head>
	<meta charset="UTF-8">
	<style>
			table, th, td {
				border: 1px solid black;
			   background-color:#ffffbf;
			   cursor:pointer;
			}
			table {

				display: table;
				border: 1px solid black;
				border-collapse: separate;
				border-spacing: 1px;
                font-family: Arial, Helvetica, sans-serif ;
			}
	</style>
	</head>

	<body bgcolor=black>

	<center><h2 style="background-color:navy;color:bisque;width:350px;"> Decimals chars from <<thisform.spinner1.value>> to <<thisform.spinner2.value>> </h2></center>
	<<m.x>>
	</body>
	</html>
	ENDTEXT

	Strtofile(m.myvar,m.yrep+"asup.html")
	Thisform.olecontrol1.Navigate(m.yrep+"asup.html")
Endproc

Procedure yoct
	Parameters nTempNum, nNewBase

	Store 0 To nWorkVal,;
		remainder,;
		dividend,;
		nextnum,;
		digit

	nWorkVal = nTempNum
	ret_str = ''

	Do While .T.
		digit = Mod(nWorkVal, nNewBase)
		dividend = nWorkVal / nNewBase
		nWorkVal = Int(dividend)

		Do Case
			Case digit = 10
				ret_str = 'a' + ret_str
			Case digit = 11
				ret_str = 'b' + ret_str
			Case digit = 12
				ret_str = 'c' + ret_str
			Case digit = 13
				ret_str = 'd' + ret_str
			Case digit = 14
				ret_str = 'e' + ret_str
			Case digit = 15
				ret_str = 'f' + ret_str
			Otherwise
				ret_str = Ltrim(Str(digit)) + ret_str
		Endcase

		If nWorkVal = 0
			Exit
		Endif ( nWorkVal = 0 )
	Enddo ( .T. )
	Return ret_str
Endproc


Procedure ybeautify

	*set styles can add any style colors (or customize fontname,fontsize dimensiosn in CSS)
	With Thisform
		.AddProperty("ycolor1","#d3e9ff" ) &&hover TD color
		.AddProperty("ycolor2","#aad4ff")  &&TD background color
		.AddProperty("ycolor3","#000000" ) &&TD forecolor
		.AddProperty("ycolor4","#0057af" ) &&tr:first-child td color
		.AddProperty("ycolor5","#ffffff" ) &&t:first forecolor
		.AddProperty("yfontsize","20")     &&fontsize
	Endwith
	*build the html table with style set.
	Local m.xx,m.cr
	m.cr=Chr(13)

	TEXT to m.xx noshow
			<center>
			<div class="CSSTable" >
				  <table >
				  <tr>
	ENDTEXT
	For i=1 To Fcount()
		m.xx=m.xx+"<td>"+Allt(Field(i))+"</td>"
	Endfor
	m.xx=m.xx+"</tr>"+cr

	Scan
		m.xx=m.xx+"<tr>"
		For i=1 To Fcount()
			m.xx=m.xx+"<td>"+Trans(Eval(Allt(Field(i))))+"</td>"
		Endfor
		m.xx=m.xx+"</tr>"+cr
	Endscan
	m.xx=m.xx+"</table>"+cr+"</div></center>"

	Local m.myvar
	TEXT to m.myvar textmerge noshow

			<style>
			.CSSTable {
				margin:0px;padding:0px;
				width:98%;
				box-shadow: 10px 10px 5px #888888;
				border:1px solid #ffffff;

				-moz-border-radius-bottomleft:0px;
				-webkit-border-bottom-left-radius:0px;
				border-bottom-left-radius:0px;

				-moz-border-radius-bottomright:0px;
				-webkit-border-bottom-right-radius:0px;
				border-bottom-right-radius:0px;

				-moz-border-radius-topright:0px;
				-webkit-border-top-right-radius:0px;
				border-top-right-radius:0px;

				-moz-border-radius-topleft:0px;
				-webkit-border-top-left-radius:0px;
				border-top-left-radius:0px;
			}
			.CSSTable table{
				border-collapse: collapse;
					border-spacing: 0;
				width:100%;
				height:25%;
				margin:0px;padding:0px;
			}
			.CSSTable tr:last-child td:last-child {
				-moz-border-radius-bottomright:0px;
				-webkit-border-bottom-right-radius:0px;
				border-bottom-right-radius:0px;
			}
			.CSSTable table tr:first-child td:first-child {
				-moz-border-radius-topleft:0px;
				-webkit-border-top-left-radius:0px;
				border-top-left-radius:0px;
			}
			.CSSTable table tr:first-child td:last-child {
				-moz-border-radius-topright:0px;
				-webkit-border-top-right-radius:0px;
				border-top-right-radius:0px;
			}
			.CSSTable tr:last-child td:first-child{
				-moz-border-radius-bottomleft:0px;
				-webkit-border-bottom-left-radius:0px;
				border-bottom-left-radius:0px;
			}
			.CSSTable tr:hover td{
				background-color:<<thisform.ycolor1>>

			}
			.CSSTable td{
				vertical-align:middle;
				background-color:<<thisform.ycolor2>> ;
				border:1px solid #ffffff;
				border-width:0px 1px 1px 0px;
				text-align:left;
				padding:5px;
				font-size:<<thisform.yfontsize>>px;
				font-family:Arial;
				font-weight:normal;
				color:<<thisform.ycolor3>>
			}
			.CSSTable tr:last-child td{
				border-width:0px 1px 0px 0px;
			}
			.CSSTable tr td:last-child{
				border-width:0px 0px 1px 0px;
			}
			.CSSTable tr:last-child td:last-child{
				border-width:0px 0px 0px 0px;
			}
			.CSSTable tr:first-child td{
		background:-o-linear-gradient(bottom, #0057af 5%, #0057af 100%);
        background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #0057af), color-stop(1, #0057af) );
		background:-moz-linear-gradient( center top, #0057af 5%, #0057af 100% );
		filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#0057af", endColorstr="#0057af");
          background: -o-linear-gradient(top,#0057af,0057af);
				background-color:<<thisform.ycolor4>> ;
				border:0px solid #ffffff;
				text-align:center;
				border-width:0px 0px 1px 1px;
				font-size:14px;
				font-family:Arial;
				font-weight:bold;
				color:<<thisform.ycolor5>>
			}
			.CSSTable tr:first-child:hover td{
				background:-o-linear-gradient(bottom, #0057af 5%, #0057af 100%);    background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #0057af), color-stop(1, #0057af) );
				background:-moz-linear-gradient( center top, #0057af 5%, #0057af 100% );
				filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#0057af", endColorstr="#0057af");    background: -o-linear-gradient(top,#0057af,0057af);

				background-color:#0057af;
			}
			.CSSTable tr:first-child td:first-child{
				border-width:0px 0px 1px 0px;
			}
			.CSSTable tr:first-child td:last-child{
				border-width:0px 0px 1px 1px;
			}
			</style>
			<body bgcolor=bisque>
			<<m.xx>>
			</body>
	ENDTEXT
	Local m.lcdest
	m.lcdest=Addbs(Sys(2023))+"ycss_table1.html"
	Strtofile(m.myvar, m.lcdest)
	Thisform.olecontrol1.Navigate(m.lcdest)
Endproc

Procedure Destroy
	Erase  (Addbs(Sys(2023))+"ycss_table1.html")
	Erase  (Addbs(Sys(2023))+"export.txt")
	Clea Events
Endproc

Procedure Activate
	Thisform.command1.Click
Endproc

Procedure command1.Click
	If Thisform.spinner1.Value<Thisform.spinner2.Value
		Thisform.ybuild(Thisform.spinner1.Value,Thisform.spinner2.Value)
	Endi
Endproc

Procedure olecontrol1.Init
	This.silent=.T.
Endproc

Procedure text1.Valid

	*thisform.label1.caption=TRANSFORM(this.value, "@0")

	Thisform.olecontrol2.Document.getElementById("yb").innerhtml="&#"+Trans(This.Value)
Endproc

Procedure olecontrol2.Init
	Publi m.yrep
	m.yrep=Addbs(Justpath(Sys(16,1)))
	This.silent=.T.
	Local m.myvar
	TEXT to m.myvar noshow
	local m.myvar
	text to m.myvar textmerge noshow
	<!DOCTYPE html>
	<html>
	<meta charset="UTF-8">
	<body bgcolor=black leftmargin=0 topmargin=0>
	<center><div id="yb" style="background-color:black;color:cyan;font-size:90px;font-bold;"></div></center>
	</body>
	</html>
	ENDTEXT

	Strtofile(m.myvar,m.yrep+"asup1.html")

	Thisform.olecontrol2.Navigate(m.yrep+"asup1.html")
Endproc

Procedure command2.Click
	Keyboard " " Clear
	Local v0
	v0=Thisform.spinner1.Value
	For i=Thisform.spinner1.Value To Thisform.spinner2.Value     &&65235
		Thisform.spinner1.Value=i
		Thisform.olecontrol2.Document.getElementById("yb").innerhtml="&#"+Trans(i)
		Inke(0.3)
		If Lastkey()=27
			Exit
		Endi
	Endfor
	Thisform.spinner1.Value=v0

Endproc

Procedure label1.Click
	Run/N snippingtool.Exe
Endproc

Procedure image1.Click
	Run/N explorer  &yrep
Endproc

Procedure image1.Init
	This.Picture=Home(1)+"graphics\icons\win95\explorer.ico"
Endproc

Procedure label2.Click
	*try
	Sele ycurs
	Thisform.ybeautify()
	*catch
	*endtry
Endproc


Procedure label3.Click
	*try
	Local myvar
	TEXT to m.myvar noshow
**********************************************
*Decimal  Octal         HTML         Hex     *
**********************************************

	ENDTEXT

	Local m.lcdest
	m.lcdest=Addbs(Sys(2023))+"export.txt"
	If File(m.lcdest)
		Erase (lcdest)
	Endi

	Sele ycurs
	Copy  Fields Deci,octal,codeHTML,hex   To  (m.lcdest)  Sdf
	m.x=m.myvar+Filetostr(m.lcdest)
	Strtofile(m.x,m.lcdest)

	Run/N notepad &lcdest
	*catch
	*endtry
Endproc

Procedure ymessagebox
		Lparameters xtext,xtitle
		#Define MB_ICONINFORMATION 0x00000040
		#Define MB_OK 0x00000000
		#Define MB_APPLMODAL 0x00000000
		#Define  MB_DEFBUTTON1 0x00000000

		Declare Integer MessageBox In user32 As MessageBoxA ;
			INTEGER HWnd,;
			STRING  lpText,;
			STRING  lpCaption,;
			INTEGER wType
		*buttons
		#Define MB_ABORTRETRYIGNORE 0x00000002
		#Define MB_CANCELTRYCONTINUE 0x00000006
		#Define MB_HELP 0x00004000

		#Define MB_OKCANCEL 0x00000001
		#Define MB_RETRYCANCEL 0x00000005
		#Define MB_YESNO  0x00000004
		#Define MB_YESNOCANCEL 0x00000003

		*Icons
		#Define  MB_ICONEXCLAMATION 0x00000030
		#Define MB_ICONWARNING 0x00000030

		#Define MB_ICONASTERISK 0x00000040
		#Define MB_ICONQUESTION 0x00000020
		#Define MB_ICONSTOP 0x00000010
		#Define MB_ICONERROR 0x00000010
		#Define MB_ICONHAND  0x00000010

		*To indicate the default button, specify one of the following values.

		#Define MB_DEFBUTTON2 0x00000100
		#Define MB_DEFBUTTON3 0x00000200
		#Define MB_DEFBUTTON4 0x00000300

		*To indicate the modality of the dialog box, specify one of the following values.

		#Define MB_SYSTEMMODAL 0x00001000
		#Define MB_TASKMODAL 0x00002000

		*To specify other options, use one or more of the following values.
		#Define MB_DEFAULT_DESKTOP_ONLY 0x00020000
		#Define MB_RIGHT 0x00080000
		#Define MB_RTLREADING  0x00100000
		#Define MB_SETFOREGROUND  0x00010000
		#Define MB_TOPMOST  0x00040000
		#Define MB_SERVICE_NOTIFICATION 0x00200000

		*Return code
		#Define IDABORT 3
		#Define IDCANCEL 2
		#Define IDCONTINUE 11
		#Define IDIGNORE 5
		#Define IDNO 7
		#Define IDOK 1
		#Define IDRETRY 4
		#Define IDTRYAGAIN 10
		#Define IDYES 6
		MessageBoxA(_vfp.HWnd,xtext,xtitle,MB_APPLMODAL+MB_OK +MB_ICONINFORMATION +MB_DEFBUTTON1 )

	Endproc
Procedure yhelp.Click
		Local m.myvar
		TEXT to m.myvar noshow
this second code dont use resource but build a complete table of representation chras from 0 to 65536 based on
decimal values (simply 0 to 65536).
Each Unicode character has a ID. It is a integer, starting at 0. This number is called the character's codepoint.
There are many encoding systems. The most popular encoding systems used today are:
    ASCII. For English. Most widely used before year 2000.
    UTF-8 of Unicode (used in Linux by default, and much of the Internet)
    UTF-16 of Unicode (used by Microsoft Windows and Mac OS X's file systems, Java programing language, …)

Unicode's character set includes ALL human language's written symbols. It includes the tens of thousands Chinese characters, math symbols, as well as characters of dead languages, such as Egyptian Hieroglyph.

For this to work, the "charset" of the Web page should be set to Unicode:



Unicode allows for 17 planes, each of 65,536 possible characters (or 'code points'). This gives a total of 1,114,112 possible characters. At present, only about 10% of this space has been allocated.
the char representation depend on formatting as
-decimal (base 10) 0,12,3,....65536....)
-HTML : its "&#"+decimal .
-hexadecimal
-octal (base 8)
can convert from a based char to another as pointed in code (see the built cursor).  
		ENDTEXT
		Thisform.ymessagebox(m.myvar,"Summary help")
	Endproc



Enddefine
*
*-- EndDefine: ychars



Note: I used the windows snippingTool.exe to capture (one line of code) and its in all windows recent systems.
Note: I used the windows snippingTool.exe to capture (one line of code) and its in all windows recent systems.
Note: I used the windows snippingTool.exe to capture (one line of code) and its in all windows recent systems.
Note: I used the windows snippingTool.exe to capture (one line of code) and its in all windows recent systems.
Note: I used the windows snippingTool.exe to capture (one line of code) and its in all windows recent systems.

Note: I used the windows snippingTool.exe to capture (one line of code) and its in all windows recent systems.

Click on code to select [then copy] -click outside to deselect


*3*
*this code makes the fontname(font-family) variable.it gathers all system present fontnames in a combo and builds the relative web page.
*in principe its the same code as *2* with this variant.the char range is restricted  from 0-255 only.
*bug corrected (Pointed by Koen):the grid headers are set to font-family:arial to avoid some signs in special fonts.

Publi yform
yform=Newobject("yfont255")
yform.Show
Read Events
Retu
*
Define Class yfont255  As Form
    Height = 575
	Width = 1000
	ShowWindow = 2
	ShowTips = .T.
	AutoCenter = .T.
	Caption = "255 chars representation  with any  fontname"
	BackColor = Rgb(212,208,200)
	Name = "Form1"

	Add Object spinner1 As Spinner With ;
		Anchor = 768, ;
		Height = 24, ;
		KeyboardHighValue = 255, ;
		KeyboardLowValue = 0, ;
		Left = 17, ;
		SpinnerHighValue = 255.00, ;
		SpinnerLowValue =   0.00, ;
		ToolTipText = "0-255", ;
		Top = 71, ;
		Width = 93, ;
		Value = 0, ;
		Name = "Spinner1"

	Add Object spinner2 As Spinner With ;
		Anchor = 768, ;
		Height = 24, ;
		KeyboardHighValue = 255, ;
		KeyboardLowValue = 0, ;
		Left = 17, ;
		SpinnerHighValue = 255.00, ;
		SpinnerLowValue =   0.00, ;
		ToolTipText = "0-255", ;
		Top = 97, ;
		Width = 97, ;
		Value = 255, ;
		Name = "Spinner2"

	Add Object command1 As CommandButton With ;
		Top = 133, ;
		Left = 24, ;
		Height = 37, ;
		Width = 85, ;
		FontBold = .T., ;
		FontSize = 10, ;
		Anchor = 768, ;
		Caption = "Build", ;
		MousePointer = 15, ;
		BackColor = Rgb(215,174,255), ;
		Name = "Command1"

	Add Object olecontrol1 As OleControl With ;
		Oleclass="shell.explorer.2", ;
		Top = 0, ;
		Left = 226, ;
		Height = 540, ;
		Width = 770, ;
		Anchor = 15, ;
		Name = "Olecontrol1"

	Add Object text1 As TextBox With ;
		FontBold = .T., ;
		Anchor = 768, ;
		Alignment = 3, ;
		Value = 0, ;
		Height = 25, ;
		Left = 24, ;
		Top = 453, ;
		Width = 121, ;
		Name = "Text1"

	Add Object olecontrol2 As OleControl With ;
		Oleclass="shell.explorer.2", ;
		Top = 229, ;
		Left = 3, ;
		Height = 204, ;
		Width = 210, ;
		Anchor = 768, ;
		Name = "Olecontrol2"

	Add Object command2 As CommandButton With ;
		Top = 501, ;
		Left = 24, ;
		Height = 26, ;
		Width = 121, ;
		FontBold = .T., ;
		Anchor = 768, ;
		Caption = "Anim (Esc to stop)", ;
		MousePointer = 15, ;
		Name = "Command2"

	Add Object label1 As Label With ;
		AutoSize = .F., ;
		Anchor = 768, ;
		Alignment = 2, ;
		BackStyle = 1, ;
		BorderStyle = 0, ;
		Caption = "Capture", ;
		Height = 17, ;
		Left = 30, ;
		MousePointer = 15, ;
		Top = 481, ;
		Width = 114, ;
		BackColor = Rgb(255,255,128), ;
		Name = "Label1"

	Add Object image1 As Image With ;
		Anchor = 768, ;
		Picture = Home(1)+"graphics\icons\win95\explorer.ico", ;
		BackStyle = 0, ;
		Height = 32, ;
		Left = 156, ;
		MousePointer = 15, ;
		Top = 471, ;
		Width = 32, ;
		ToolTipText = "Explorer", ;
		Name = "Image1"

	Add Object label2 As Label With ;
		AutoSize = .T., ;
		FontBold = .T., ;
		FontSize = 12, ;
		Anchor = 768, ;
		Alignment = 2, ;
		Caption = "Selected  CharsTable", ;
		Height = 22, ;
		Left = 406, ;
		MousePointer = 15, ;
		Top = 555, ;
		Width = 164, ;
		BackColor = Rgb(255,255,128), ;
		enabled=.T., ;
		Name = "Label2"

	Add Object label3 As Label With ;
		AutoSize = .T., ;
		FontBold = .T., ;
		FontSize = 12, ;
		Anchor = 768, ;
		Alignment = 2, ;
		Caption = "Export table to txt", ;
		Height = 22, ;
		Left = 657, ;
		MousePointer = 15, ;
		Top = 553, ;
		Width = 136, ;
		BackColor = Rgb(255,255,128), ;
		Name = "Label3"

	Add Object combo1 As ComboBox With ;
		FontBold = .T., ;
		Height = 37, ;
		Left = 12, ;
		MousePointer = 15, ;
		Top = 12, ;
		Width = 169, ;
		Name = "Combo1"

	Add Object label4 As Label With ;
		AutoSize = .T., ;
		FontBold = .T., ;
		FontSize = 20, ;
		BackStyle = 0, ;
		Caption = "?", ;
		Height = 35, ;
		Left = 874, ;
		MousePointer = 15, ;
		Top = 545, ;
		Width = 19, ;
		ForeColor = Rgb(128,0,64), ;
		Name = "Label4"

	Procedure ybuild
		Lparameters xmin,xmax
		Local m.x,m.ii
		Create Cursor ycurs (Deci c(10),codeHTML c(10),hex c(10),octal c(15))
		m.he="<br><tr><td style='font-family:arial;'>"+Spac(2)+"</td>"

		For i=0 To 19
			If i=0
				m.he=m.he+"<td style='font-family:arial;'>00</td>"
			Else

				If Between(i,1,9)
					r="0"+Trans(i)
				Else
					r=Trans(i)
				Endi
				m.he=m.he+"<td style='font-bold;font-family:arial'>"+r+"</td>"
			Endi

		Endfor
		m.he=m.he+"</tr>"

		m.x="<center><table>"
		m.x=m.x+m.he
		j=1
		k=xmin
		w=1
		Max=xmax    &&65536
		For i=xmin To Max   &&65536

			*if i=65021    &&too long/cell
			*i=i+1
			*loop
			*endi

			If j=1
				m.x=m.x+ "<tr><td style='font-bold;font-family:arial;'>"+Trans(k)+"</td>"
			Endi

			Insert Into ycurs Values (Trans(i),"&#"+Trans(i),Transform(i, "@0"),Thisform.yoct(i,8))

			m.u=" title=' #"+Allt(Deci)+" -unicode="+hex  +" -Html:& "+Substr(Allt(codeHTML),2)+"-Octal:"+Trans(octal) +"'"
			m.x=m.x+  '<td  onclick="alert('+"'Decimal="+Trans(Deci,"99999")+"-Unicode="+hex+" -Html:"+"& # "+Trans(Deci,"99999")+" -octal:"+Trans(octal)+[')"; style="color:purple;font-size:28px;font-bold;"]+m.u +">"+Allt(codeHTML)+Chr(13) +"</td>"+Chr(13)

			j=j+1
			If j>20
				w=w+1
				j=1
				m.x=m.x+"</tr>"+Chr(13)+"<tr>"
				k=k+20
			Endi

			If k>Max
				m.x=m.x+"</tr></table></center>"
				Exit
			Endi

			If w>25
				w=0
				m.x=m.x+"</tr></table></center>"
				m.x=m.x+"<br><br>"+"<center><table><tr>"
				m.x=m.x +m.he
			Endi
		Endfor
		*brow nowait
		Local m.myvar
		TEXT to m.myvar textmerge noshow
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
        table, th, td {
			border: 1px solid black;
		   background-color:#C4FFFF;
		   cursor:pointer;
		}
		table {

			display: table;
			border: 1px solid black;
			border-collapse: separate;
			border-spacing: 1px;
			font-family:<<thisform.combo1.value>>
		}
</style>
</head>

<body bgcolor=black>

<center><h2 style="background-color:navy;color:bisque;width:350px;">Font-family=<<thisform.combo1.value>> [Decimals chars from <<thisform.spinner1.value>> to <<thisform.spinner2.value>>]</h2></center>
<<m.x>>
</body>
</html>
		ENDTEXT
		Set Safe Off
		Strtofile(m.myvar,m.yrep+"asup.html")
		Thisform.olecontrol1.Navigate(m.yrep+"asup.html")
	Endproc

	Procedure yoct
		Parameters nTempNum, nNewBase
		Store 0 To nWorkVal,;
			remainder,;
			dividend,;
			nextnum,;
			digit

		nWorkVal = nTempNum
		ret_str = ''
		Do While .T.
			digit = Mod(nWorkVal, nNewBase)
			dividend = nWorkVal / nNewBase
			nWorkVal = Int(dividend)
			Do Case
				Case digit = 10
					ret_str = 'a' + ret_str
				Case digit = 11
					ret_str = 'b' + ret_str
				Case digit = 12
					ret_str = 'c' + ret_str
				Case digit = 13
					ret_str = 'd' + ret_str
				Case digit = 14
					ret_str = 'e' + ret_str
				Case digit = 15
					ret_str = 'f' + ret_str
				Otherwise
					ret_str = Ltrim(Str(digit)) + ret_str
			Endcase
			If nWorkVal = 0
				Exit
			Endif ( nWorkVal = 0 )
		Enddo ( .T. )
		Return ret_str
	Endproc


	Procedure ybeautify

		*set styles can add any style colors (or customize fontname,fontsize dimensiosn in CSS)
		With Thisform
			.AddProperty("ycolor1","#d3e9ff" ) &&hover TD color
			.AddProperty("ycolor2","#aad4ff")  &&TD background color
			.AddProperty("ycolor3","#000000" ) &&TD forecolor
			.AddProperty("ycolor4","#0057af" ) &&tr:first-child td color
			.AddProperty("ycolor5","#ffffff" ) &&t:first forecolor
			.AddProperty("yfontsize","20")     &&fontsize
		Endwith
		*build the html table with style set.
		Local m.xx,m.cr
		m.cr=Chr(13)

		TEXT to m.xx noshow
		<center>
		<div class="CSSTable" >
			  <table >
			  <tr>
		ENDTEXT
		For i=1 To Fcount()
			m.xx=m.xx+"<td>"+Allt(Field(i))+"</td>"
		Endfor
		m.xx=m.xx+"</tr>"+cr

		Scan
			m.xx=m.xx+"<tr>"
			For i=1 To Fcount()
				If i=2
		m.xx=m.xx+"<td style='font-family:"+Thisform.combo1.Value+";'>"+Trans(Eval(Allt(Field(i))))+"</td>"
				Else
					m.xx=m.xx+"<td>"+Trans(Eval(Allt(Field(i))))+"</td>"
				Endi
			Endfor
			m.xx=m.xx+"</tr>"+cr
		Endscan
		m.xx=m.xx+"</table>"+cr+"</div></center>"

		Local m.myvar
		TEXT to m.myvar textmerge noshow

		<style>
		.CSSTable {
			margin:0px;padding:0px;
			width:50%;
			box-shadow: 10px 10px 5px #888888;
			border:1px solid #ffffff;

			-moz-border-radius-bottomleft:0px;
			-webkit-border-bottom-left-radius:0px;
			border-bottom-left-radius:0px;

			-moz-border-radius-bottomright:0px;
			-webkit-border-bottom-right-radius:0px;
			border-bottom-right-radius:0px;

			-moz-border-radius-topright:0px;
			-webkit-border-top-right-radius:0px;
			border-top-right-radius:0px;

			-moz-border-radius-topleft:0px;
			-webkit-border-top-left-radius:0px;
			border-top-left-radius:0px;
		}.CSSTable table{
			border-collapse: collapse;
				border-spacing: 0;
			width:100%;
			height:25%;
			margin:0px;padding:0px;
		}.CSSTable tr:last-child td:last-child {
			-moz-border-radius-bottomright:0px;
			-webkit-border-bottom-right-radius:0px;
			border-bottom-right-radius:0px;
		}
		.CSSTable table tr:first-child td:first-child {
			-moz-border-radius-topleft:0px;
			-webkit-border-top-left-radius:0px;
			border-top-left-radius:0px;
		}
		.CSSTable table tr:first-child td:last-child {
			-moz-border-radius-topright:0px;
			-webkit-border-top-right-radius:0px;
			border-top-right-radius:0px;
		}.CSSTable tr:last-child td:first-child{
			-moz-border-radius-bottomleft:0px;
			-webkit-border-bottom-left-radius:0px;
			border-bottom-left-radius:0px;
		}.CSSTable tr:hover td{
			background-color:<<thisform.ycolor1>>

		}
		.CSSTable td{
			vertical-align:middle;
			background-color:<<thisform.ycolor2>>  ;
			border:1px solid #ffffff;
			border-width:0px 1px 1px 0px;
			text-align:left;
			padding:5px;
			font-size:<<thisform.yfontsize>>px;
			font-family:Arial;
			font-weight:normal;
			color:<<thisform.ycolor3>>
		}.CSSTable tr:last-child td{
			border-width:0px 1px 0px 0px;
		}.CSSTable tr td:last-child{
			border-width:0px 0px 1px 0px;
		}.CSSTable tr:last-child td:last-child{
			border-width:0px 0px 0px 0px;
		}
		.CSSTable tr:first-child td{
				background:-o-linear-gradient(bottom, #0057af 5%, #0057af 100%);    background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #0057af), color-stop(1, #0057af) );
			background:-moz-linear-gradient( center top, #0057af 5%, #0057af 100% );
			filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#0057af", endColorstr="#0057af");    background: -o-linear-gradient(top,#0057af,0057af);

			background-color:<<thisform.ycolor4>>
			border:0px solid #ffffff;
			text-align:center;
			border-width:0px 0px 1px 1px;
			font-size:14px;
			font-family:Arial;
			font-weight:bold;
			color:<<thisform.ycolor5>>
		}
		.CSSTable tr:first-child:hover td{
			background:-o-linear-gradient(bottom, #0057af 5%, #0057af 100%);    background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #0057af), color-stop(1, #0057af) );
			background:-moz-linear-gradient( center top, #0057af 5%, #0057af 100% );
			filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#0057af", endColorstr="#0057af");    background: -o-linear-gradient(top,#0057af,0057af);

			background-color:#0057af;
		}
		.CSSTable tr:first-child td:first-child{
			border-width:0px 0px 1px 0px;
		}
		.CSSTable tr:first-child td:last-child{
			border-width:0px 0px 1px 1px;
		}
		</style>
		<<m.xx>>
		ENDTEXT
		Local m.lcdest
		m.lcdest=Addbs(Sys(2023))+"ycss_table1.html"
		Strtofile(m.myvar, m.lcdest)
		Thisform.olecontrol1.Navigate(m.lcdest)
	Endproc

	Procedure Activate
		Thisform.command1.Click
	Endproc

	Procedure Destroy
		Erase  (Addbs(Sys(2023))+"ycss_table1.html")
		Erase  (Addbs(Sys(2023))+"export.txt")
		Clea Events
	Endproc

	Procedure command1.Click
		If Thisform.spinner1.Value<Thisform.spinner2.Value
			Thisform.ybuild(Thisform.spinner1.Value,Thisform.spinner2.Value)
		Endi
	Endproc

	Procedure olecontrol1.Init
		This.silent=.T.
	Endproc

	Procedure text1.Valid
		Thisform.olecontrol2.Document.getElementById("yb").Style.fontFamily =Thisform.combo1.Value
		Thisform.olecontrol2.Document.getElementById("yb").innerhtml="&#"+Trans(This.Value)
	Endproc

	Procedure olecontrol2.Init
		Publi m.yrep
		m.yrep=Addbs(Justpath(Sys(16,1)))

		This.silent=.T.

		Local m.myvar
		TEXT to m.myvar noshow
local m.myvar
text to m.myvar textmerge noshow
<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<body bgcolor=black leftmargin=0 topmargin=0>
<center><div id="yb" style="font-family=<<thisform.combo1.value>>background-color:black;color:cyan;font-size:90px;font-bold;"></div></center>
</body>
</html>
		ENDTEXT

		Set Safe Off
		Strtofile(m.myvar,m.yrep+"asup1.html")
		Thisform.olecontrol2.Navigate(m.yrep+"asup1.html")
	Endproc


	Procedure command2.Click
		Keyboard " " Clear
		Local v0
		v0=Thisform.spinner1.Value
		For i=Thisform.spinner1.Value To Thisform.spinner2.Value     &&65235
			Thisform.spinner1.Value=i
            Thisform.olecontrol2.Document.getElementById("yb").style.fontfamily=thisform.combo1.value
			Thisform.olecontrol2.Document.getElementById("yb").innerhtml="&#"+Trans(i)
			Inke(0.2)
			If Lastkey()=27
				Exit
			Endi
		Endfor
		Thisform.spinner1.Value=v0
	Endproc

	Procedure label1.Click
		Run/N snippingtool.Exe
	Endproc

	Procedure image1.Init
		This.Picture=Home(1)+"graphics\icons\win95\explorer.ico"
	Endproc

	Procedure image1.Click
		Run/N explorer  &yrep
	Endproc

	Procedure label2.Click
		*try
		Sele ycurs
		Thisform.ybeautify()
		*catch
		*endtry
	Endproc


	Procedure label3.Click
		*try
		Local myvary
		TEXT to m.myvar noshow
**********************************************
*Decimal  Octal         HTML         Hex     *
**********************************************

		ENDTEXT
		Local m.lcdest
		m.lcdest=Addbs(Sys(2023))+"export.txt"
		If File(m.lcdest)
			Erase (lcdest)
		Endi

		Sele ycurs
		Copy  Fields Deci,octal,codeHTML,hex   To  (m.lcdest)  Sdf

		m.x=m.myvar+Filetostr(m.lcdest)
		Strtofile(m.x,m.lcdest)

		Run/N notepad &lcdest
		*catch
		*endtry
	Endproc


	Procedure combo1.Click
		Thisform.command1.Click()
	Endproc

	Procedure combo1.Init
		Dimension x[1]
		=Afont(x)
		With This
			For i = 1 To Alen(x)
				.AddItem(x[i])
			Endfor
			.Value="Arial"
			.Style=2
		Endwith
	Endproc

	Procedure label4.Click
		Local m.myvar
		TEXT to m.myvar noshow
the same method as code *2* but with restricted chars from 0-255
in this case the fontname (style.fontFamily of a div in browser document) is variable.

-can choose some particular system fonts as:
webdings
wingdings
wingdings 2
wingdings 3
marlett
.....

to see special chars.
of course any char can be captured and saved as image (png,jpg,bmp,gif..)

		ENDTEXT
		Messagebox(m.myvar,0+32+4096,"Summary help")
	Endproc

Enddefine
*
*-- EndDefine: yfont255


A visual foxpro CHARMAP
A visual foxpro CHARMAP
A visual foxpro CHARMAP

Click on code to select [then copy] -click outside to deselect


*4* this retrieves and views  292 special chars  on a top level form.
*can capture any zone on the olebrowser.

Publi yform
yform=Newobject("specialChars")
yform.Show
Read Events
Retu
*
Define Class specialChars As Form
    Top = 0
	Left = 0
	Height = 549
	Width = 949
	ShowWindow = 2
	DoCreate = .T.
	ShowTips = .T.
	Caption = "Some special characters"
	BackColor = Rgb(255,255,191)
	Name = "Form1"

	Add Object olecontrol1 As OleControl With ;
		Oleclass="shell.explorer.2",;
		Top = 0, ;
		Left = 0, ;
		Height = 552, ;
		Width = 900, ;
		Anchor = 15, ;
		Name = "Olecontrol1"

	Add Object image1 As Image With ;
		Anchor = 768, ;
		Picture = Home(1)+"graphics\icons\misc\camera.ico", ;
		BackStyle = 0, ;
		Height = 32, ;
		Left = 909, ;
		MousePointer = 15, ;
		Top = 12, ;
		Width = 32, ;
		ToolTipText = "Capture zone", ;
		Name = "Image1"

	Procedure Init
		_Screen.WindowState=1

		With Thisform
			.Left=0
			.Top=0
			.Width=Sysmetric(1)-5
			.Height=Sysmetric(2)
		Endwith
		Local m.myvar
		TEXT to m.myvar noshow
33,34,35,36,37,38,39,40,41,42,43,44,45,69,70,71,72,73,74,75,76,77,78,79,85,86,87,88,89,90,91,96,97,98,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,118,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,207,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,220,221,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,251,252,253,254,255,1421,6105,8748,8749,8751,8752,8998,8999,9000,9187,9193,9194,9195,9197,9198,9199,9200,9201,9202,9203,9204,9205,9206,9207,9208,9209,9210,9638,9673,9711,9742,9743,9784,9818,9819,9820,9843,9851,9852,9878,9917,10004,10026,10027,10028,10029,10030,10031,10032,10033,10034,10035,10036,10037,10038,10039,10040,10041,10042,10043,10044,10045,
10046,10047,10048,10049,10050,10051,10052,10053,10054,10055,10056,10057,10058,10059,10060,10061,10062,10063,10063,10064,10065,10066,10067,10068,10069,10070,10148,10149,10150,10151,10152,10153,10154,10155,10156,10157,10158,11039,11040,11041,11042,11043,11044,11045,11097,65312	
  endtext
       m.myvar=strtran(m.myvar," ","")
		m.myvar=Strtran(m.myvar,",",Chr(13))
_cliptext=m.myvar
		Create Cursor ycurs ( xcode c(10),xfont c(10))
		Local i,rv,fon
		For j=1 To Memlines(m.myvar)
		
			Do Case
				Case Between(j,1,113)
					m.fon="webdings"
				Case Between (j,114,184)
					m.fon="wingdings"
				Otherwise
					m.fon="arial"
			Endcase
			rv="&#"+Allt(Mline(m.myvar,j))
			Insert Into ycurs Values (m.rv,m.fon)
		Endfor
		*brow
		Locate
		Thisform.Caption="Some special Charcters  ["+Trans(Reccount())+" ]"
		Local m.xx
		m.xx="<center><table><tr>"
		Sele ycurs
		i=1
		Scan
			m.ti=" title='& #"+Substr(Allt(xcode),3)+" -"+Allt(xfont)+"'"
			m.tii="'& #"+Substr(Allt(xcode),3)+" -"+Allt(xfont)+"'"
			m.xx=m.xx+'<td style="font-family:'+Allt(xfont)+';font-size:100px;color:maroon;" '+m.ti+'  onclick="alert(' +m.tii+')">'+xcode+"</td>"
			i=i+1
			If  i>7
				m.xx=m.xx+"</tr>"+Chr(13)
				i=1
			Endi
		Endscan
		m.xx=m.xx+"</tr></table></center>"

		TEXT to m.myvar textmerge noshow
			<!DOCTYPE html>
			<html>
			<head>
			<meta charset="UTF-8">
			<style>
					table, th, td {
						border: 1px solid black;
					   background-color:#ffffbf;
					   cursor:pointer;
					}
					table {

						display: table;
						border: 1px solid black;
						border-collapse: separate;
						border-spacing: 1px;
					}
			</style>
			<body bgcolor=black>
			<<m.xx>>
			</body>
			</html>
		ENDTEXT

		Set Safe Off
		Local m.lcdest
		m.lcdest=Addbs(Sys(2023))+"temp.html"
		Strtofile(m.myvar,m.lcdest)
		Thisform.olecontrol1.Navigate(m.lcdest)
	Endproc

	Procedure Destroy
		Erase Addbs(Sys(2023))+"temp.html"
		Clea Events
	Endproc

	Procedure olecontrol1.Init
		This.silent=.T.
	Endproc

	Procedure image1.Click
		Run/N snippingtool
	Endproc


Enddefine
*
*-- EndDefine: specialChars


A visual foxpro CHARMAP

Important:All Codes above are tested on VFP9SP2 & windows 10 pro and IE11 emulation

Please come back with any bug.correcting code is usefull to all readers.

To be informed of the latest articles, subscribe:
Comment on this post