Results 1 to 10 of 570

Thread: Tests Copying, Pasting, API Cliipboard issues. and Rough notes on Advanced API stuff

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,457
    Rep Power
    10
    ……… continued from last post

    The "first 256 ( 0, 1, 2 …… 255 )"
    Ascii and perpetrating ANSI historical reference misnomers

    7 (8) Bit Byte Ascii

    So these ASCII numbers and character lists, got organised in the ways discussed above, and we end up describing ASCII as Single Byte (which is 8 Bits), encoding using the bottom 7 digits. That might mean, for example that the first digit Bit would be used for something else, but I have not heard of anything about that.
    Having the eight digits, and so the possibility to go up to numbers of 128+127=255, can blur the issue a bit, and we may sometimes be talking of things like "extended ASCII" going up to at least 255. (Of course with 8 digits we can go from [0] to [128+127=255] ). But officially, Ascii is an internationally defined standard for the first 127. Any extensions are not ASCII**.
    At about 1981, for example, IBM got seriously into a PC attempt, and introduced a "Code page 437 (IBM PC)", as most (not all) such things it takes the standard Ascii up to and including 127, then up to 255 had what was an attempt to make the best compromise to make the best chance of character encoding standardisation which suited at the time. There is no formal definition of "extended ASCII"**, and is often mistakenly interpreted to mean that the American National Standards Institute (ANSI) .
    ANSI as applied to an 8-bit character encoding that includes the ASCII characters is not a thing, far less a standard. Microsoft are at least partially to blame for this common error (Microsoft's 8-bit character encoding for the latin character set is actually called Windows-1252 - or cp1252, since we have now moved into the world of Code Pages -, which doesn't really trip of the tongues as easily as ANSI). As they themselves say "The term ANSI as used to signify Windows code pages is a historical reference, but is nowadays a misnomer that continues to persist in the Windows community."

    So when talking about ASCII, we blur into ANSI, which started somewhat later and tends to also have the Byte (so 8 Bits) as its "unit", but generally always does use all available 255 numbers in a Byte if it is used for basic text, mainly to allow extending into some of the main non English characters.
    You should expect to get a bit confused with Bits and Bytes. Don’t worry too much. Hopefully re reading the first few posts in this page will help get it clear.

    The attempt at a large text table in the next post is an abstract from the uploaded file, only a very small part, and talking ASCII or Asc things in everyday usage, or when talking about Ascii or Ansi things in VB/ VBA, usually means talking about things in that first small part, in one way or another.
    For example, talking VB/VBA things, there is a VB/VBA function to get you a typical English text character, ( letter, number, or most typical other all day text characters, including the invisible ones), and a few non English things )
    , Chr()
    , often written in coding something like
    Chr(Asc) or Chr(Anumber)
    , where Asc or Anumber would be an integer number from 0 to 255,
    Note that Asc may not be such a sensible choice for a variable to use in actual coding, since we have a function, Asc(" ") which, as you may guess, does the reverse, getting the Ascii/Ansi number from a single character you put between the " " , like pseudo,
    Asc("A") = 65
    Code:
    Sub ANSIandUnicodeList()  '    , Share ‘WunucodeANSI.xlsm’ https://app.box.com/s/20erozqcjs2ljphkiycvbtah08y85fy9      https://www.excelfox.com/forum/showthread.php/2824-Tests-Copying-Pasting-API-Cliipboard-issues-and-Rough-notes-on-Advanced-API-stuff?p=17877&viewfull=1#post17877
    Rem 1 ASCII ANSI List
    Dim Anumber As Long
        For Anumber = 0 To 255   ' Typical range considered for ASCII or ANSI  Sometimes ASCII is regarded as just 0 - 127
         Let Range("C" & Anumber + 3 & "") = Anumber      ' ASCII / ANSI character "number"
         Let Range("D" & Anumber + 3 & "") = Chr(Anumber)
        Next Anumber
    
    Rem 2 Unicode List
    Dim Wunucs As Long
        For Wunucs = 0 To 65535   ' For Unicode the range is much bigger, 144697 currently, 1111998 possible  , but  65535  seems to be the limit for the ChrW() function
         Let Range("T" & Wunucs + 3 & "") = Wunucs        ' Unicode character "number"
         Let Range("U" & Wunucs + 3 & "") = ChrW(Wunucs)
        Next Wunucs
    End Sub
    Rem 1 in that simple coding would get most of the first things in that table abstract in the next post.
    The first column of characters was got using the Chr() function as in that coding above ( The Chr() function will error for numbers greater than 255 )
    The second two columns of characters are list examples copied from the interment after searching for ASCII and ANSI lists


    It is clearer to look at the worksheet in the uploaded file
    , Share ‘WunucodeANSI.xlsm’ https://app.box.com/s/20erozqcjs2ljphkiycvbtah08y85fy9

    https://i.postimg.cc/cL37bvSH/Lists-...preadsheet.jpg Lists in Excel spreadsheet.jpg





    ANSI (ANSI (or Ascii) historical reference misnomer Perpetration)
    (Some of this may be repeated when we "move up" to Unicode , as the subject of Unicode is often introduced as a comparison, (not technically completely accurate) in writings titled ANSI v Unicode, with the word Unicode also having its degree or false use)
    These historical reference misnomers are a nice human tradition that should be continued, IMO, as it can help fool Chat GPT learning algorithms.
    The term ANSI can often be used incorrectly, as a historical misnomer, when discussing the "first 256"

    ANSI is the American National Standards Institute, which has been around since 1910 so maybe it was thought of originally of more everyday stuff. They only got around to thinking about computing standards in the 1980’s
    Some historical reports and opinions suggest it was originally intended not to specifically define the lists, but rather to discuss and set rules for controlling different Lists, in the range 0 to 255, whereby mostly, ( but not always ) the first 128 are the same
    As mentioned when IBM got seriously into a PC attempt, they introduced a "Code page 437 (IBM PC)" "extended ASCII" going up to at least 255. It seems that possibly lots of people had their own ideas of what should go where in the space from 128 to 255.
    ANSI, in computing was/is a second American standards idea to the Ascii. Developments at that time may have overwhelmed them.
    If we are talking Microsoft things, we might say they hijacked ANSI a bit, before ANSI had completed their initial discussions, Microsoft having a code page for a system to define something similar to ASCII extended, but not always exactly the same*. It was / is used, but mostly gave/ gives way to Unicode. Because of this strange history, around the mid 1980’s, Microsoft talked about ANSI as the new improved thing compared to ASCII - It became a general term, a historical reference misnomer, for the default code page of a given operating system, such as Windows*.
    If we are talking Microsoft VB things, we might say VB only understands ANSI characters
    From the code page you can go on to find the actual characters




    Small differences leading to corruptions
    It was like this: ANSI, the institution, people where in the process of defining a standard for how to display character data on a computer in the 1980’s. Their start point was the 8 Bit, single Byte, 0-255 numbers, and they thought the first 127 where best left at the already known and used Ascii Standard, but they also recognised that the second 128 characters would not be enough, so they also first introduced the idea they called a single code page, to define the second upper 128 character number, or code point in memory, to be a bit more technically explicit. So the idea would be that a code page that made the best compromise in their opinion or bribed by lobbying opinion, fort the best possibly world wide exchange of text information. But they were not finished, when commercial pressures forced Microsoft to highjack the idea and take it further a bit more quickly. Microsoft ended up with many code pages, and other people developed their code page as well.
    Finally ANSI came up with the ISO 8859-1 standard. Microsoft had at some point a code page very close to this, Windows code page 1252. There can be other slight deviations from the actual first 256 in use anywhere. This can lead to problems such as we had at excelfox.com a few years ago
    https://www.excelfox.com/forum/showt...ll=1#post15250
    https://www.excelfox.com/forum/showt...1-*/#post15236
    https://www.excelforum.com/developme...ssue-test.html
    https://www.excelforum.com/developme...haracters.html
    https://www.excelforum.com/developme...x-decimal.html

    Attached Files Attached Files
    Last edited by DocAElstein; 12-26-2024 at 10:27 PM.

  2. #2
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,457
    Rep Power
    10
    Text output of the first 255 in typical lists.
    These are generally regarded as the ASCII or ANSI things, which cover most all day English character things.
    This just gives a general idea, since the columns are a bit messed up and things are not always showing correctly in the following attempt. Best is to look at the worksheet in the uploaded file, as an Excel spreadsheet generally shows a very large number of these things correctly. A text file is not too bad, but the positioning of the columns often gets messed up
    Code:
    Anumber	Chr(Anumber)	ASCII	ANSI	** MS list 0-127	** MS list 128-255
    0		NUL        Null character	 		
    1		SOH        Start of header	 		
    2		STX        Start of text	 		
    3		ETX        End of text	 		
    4		EOT        End of transmission	 		
    5		ENQ        Enquiry	 		
    6		ACK        Acknowledgment	 		
    7		BEL        Bell, alert	 		
    8		BS        Backspace	 	* *	
    9	"	"	HT        Horizontal tab	 	* *	
    10	"
    "	LF        Line feed	 	* *	
    11		VT        Vertical tab	 		
    12		FF        Form feed	 		
    13	"
    "	CR        Carriage return	 	* *	
    14		SO        Shift out	 		
    15		SI        Shift in	 		
    16		DLE        Data link escape	 		
    17		DC1        Device Control 1 (XON)	 		
    18		DC2        Device Control 2	 		
    19		DC3        Device Control 3 (XOFF)	 		
    20		DC4        Device Control 4	 		
    21		NAK        Negative acknowledgment	 		
    22		SYN        Synchronous idle	 		
    23		ETB        End of transmission block	 		
    24		CAN        Cancel	 		
    25		EM        End of medium	 		
    26		SUB        Substitute	 		
    27		ESC        Escape	 		
    28		FS        File separator	 		
    29		GS        Group separator	 		
    30		RS        Record separator	 		
    31		US        Unit separator	 		
    32	 	SP        Space	           space	[space]	
    33	!	!        exclamation mark	!        exclamation mark	!	
    34	"	"        double quote	"        quotation mark	"	
    35	#	#        number sign	#        number sign	#	
    36	$	$        dollar sign	$        dollar sign	$	
    37	%	%        percent sign	%        percent sign	%	
    38	&	&        ampersand	&        ampersand	&	
    39		'        single quote	'        apostrophe	'	
    40	(	(        left/opening parenthesis	(        left parenthesis	(	
    41	)	)        right/closing parenthesis	)        right parenthesis	)	
    42	*	*        asterisk	*        asterisk	*	
    43	+	+        plus sign	+        plus sign	+	
    44	,	,        comma	,        comma	,	
    45	-	-        minus or hyphen	-        hyphen-minus	-	
    46	.	.        Period, dot	.        full stop	.	
    47	/	/        forward slash	/        solidus	/	
    48	0	0        	0        digit zero	0	
    49	1	1        	1        digit one	1	
    50	2	2        	2        digit two	2	
    51	3	3        	3        digit three	3	
    52	4	4        	4        digit four	4	
    53	5	5        	5        digit five	5	
    54	6	6        	6        digit six	6	
    55	7	7        	7        digit seven	7	
    56	8	8        	8        digit eight	8	
    57	9	9        	9        digit nine	9	
    58	:	:        colon	:        colon	:	
    59	;	;        semi-colon	;        semicolon	;	
    60	<	<        less than	<        less-than sign	<	
    61	=	=        equals	=        equals sign	=	
    62	>	>        greater than	>        greater-than sign	>	
    63	?	?        question mark	?        question mark	?	
    64	@	@        At sign	@        commercial at	@	
    65	A	A        	A        Latin capital letter A	A	
    66	B	B        	B        Latin capital letter B	B	
    67	C	C        	C        Latin capital letter C	C	
    68	D	D        	D        Latin capital letter D	D	
    69	E	E        	E        Latin capital letter E	E	
    70	F	F        	F        Latin capital letter F	F	
    71	G	G        	G        Latin capital letter G	G	
    72	H	H        	H        Latin capital letter H	H	
    73	I	I        	I        Latin capital letter I	I	
    74	J	J        	J        Latin capital letter J	J	
    75	K	K        	K        Latin capital letter K	K	
    76	L	L        	L        Latin capital letter L	L	
    77	M	M        	M        Latin capital letter M	M	
    78	N	N        	N        Latin capital letter N	N	
    79	O	O        	O        Latin capital letter O	O	
    80	P	P        	P        Latin capital letter P	P	
    81	Q	Q        	Q        Latin capital letter Q	Q	
    82	R	R        	R        Latin capital letter R	R	
    83	S	S        	S        Latin capital letter S	S	
    84	T	T        	T        Latin capital letter T	T	
    85	U	U        	U        Latin capital letter U	U	
    86	V	V        	V        Latin capital letter V	V	
    87	W	W        	W        Latin capital letter W	W	
    88	X	X        	X        Latin capital letter X	X	
    89	Y	Y        	Y        Latin capital letter Y	Y	
    90	Z	Z        	Z        Latin capital letter Z	Z	
    91	[	[        left/opening square bracket	[        left square bracket	[	
    92	\	\        back slash	\        reverse solidus	\	
    93	]	]        right/closing square bracket	]        right square bracket	]	
    94	^	^        caret/cirumflex	^        circumflex accent	^	
    95	_	_        underscore	_        low line	_	
    96	`	`        	`        grave accent	`	
    97	a	a        	a        Latin small letter a	a	
    98	b	b        	b        Latin small letter b	b	
    99	c	c        	c        Latin small letter c	c	
    100	d	d        	d        Latin small letter d	d	
    101	e	e        	e        Latin small letter e	e	
    102	f	f        	f        Latin small letter f	f	
    103	g	g        	g        Latin small letter g	g	
    104	h	h        	h        Latin small letter h	h	
    105	i	i        	i        Latin small letter i	i	
    106	j	j        	j        Latin small letter j	j	
    107	k	k        	k        Latin small letter k	k	
    108	l	l        	l        Latin small letter l	l	
    109	m	m        	m        Latin small letter m	m	
    110	n	n        	n        Latin small letter n	n	
    111	o	o        	o        Latin small letter o	o	
    112	p	p        	p        Latin small letter p	p	
    113	q	q        	q        Latin small letter q	q	
    114	r	r        	r        Latin small letter r	r	
    115	s	s        	s        Latin small letter s	s	
    116	t	t        	t        Latin small letter t	t	
    117	u	u        	u        Latin small letter u	u	
    118	v	v        	v        Latin small letter v	v	
    119	w	w        	w        Latin small letter w	w	
    120	x	x        	x        Latin small letter x	x	
    121	y	y        	y        Latin small letter y	y	
    122	z	z        	z        Latin small letter z	z	
    123	{	{        left/opening curly brace	{        left curly bracket	{	
    124	|	|        vertical bar	|        vertical line	|	
    125	}	}        right/closing curly brace	}        right curly bracket	}	
    126	~	~        equivalency sign, tilde	~        tilde	~	
    127		DEL        delete	        (not used)		
    128	€	        	€        euro sign	 	€
    129		        	        (not used)	 	
    130	‚	        	‚        single low-9 quotation mark	 	‚
    131	ƒ	        	ƒ        Latin small letter f with hook	 	ƒ
    132	„	        	„        double low-9 quotation mark	 	„
    133	…	        	…        horizontal ellipsis	 	…
    134	†	        	†        dagger	 	†
    135	‡	        	‡        double dagger	 	‡
    136	ˆ	        	ˆ        modifier letter circumflex accent	 	ˆ
    137	‰	        	‰        per mille sign	 	‰
    138	Š	        	Š        Latin capital letter S with caron	 	Š
    139	‹	        	‹        single left-pointing angle quotation mark	 	‹
    140	Ś	        	Œ        Latin capital ligature OE	 	Œ
    141	Ť	        	        (not used)	 	
    142	Ž	        	Ž        Latin capital letter Z with caron	 	Ž
    143	Ź	        	        (not used)	 	
    144		        	        (not used)	 	
    145	‘	        	‘        left single quotation mark	 	‘
    146	’	        	’        right single quotation mark	 	’
    147	“	        	“        left double quotation mark	 	“
    148	”	        	”        right double quotation mark	 	”
    149	•	        	•        bullet	 	•
    150	–	        	–        en dash	 	–
    151	—	        	—        em dash	 	—
    152	˜	        	˜        small tilde	 	˜
    153	™	        	™        trade mark sign	 	™
    154	š	        	š        Latin small letter s with caron	 	š
    155	›	        	›        single right-pointing angle quotation mark	 	›
    156	ś	        	œ        Latin small ligature oe	 	œ
    157	ť	        	        (not used)	 	
    158	ž	        	ž        Latin small letter z with caron	 	ž
    159	ź	        	Ÿ        Latin capital letter Y with diaeresis	 	Ÿ
    160	 	        	        no-break space	 	
    161	ˇ	        	¡        inverted exclamation mark	 	¡
    162	˘	        	¢        cent sign	 	¢
    163	Ł	        	£        pound sign	 	£
    164	¤	        	¤        currency sign	 	¤
    165	Ą	        	¥        yen sign	 	¥
    166	¦	        	¦        broken bar	 	¦
    167	§	        	§        section sign	 	§
    168	¨	        	¨        diaeresis	 	¨
    169	©	        	©        copyright sign	 	©
    170	Ş	        	ª        feminine ordinal indicator	 	ª
    171	«	        	«        left-pointing double angle quotation mark	 	«
    172	¬	        	¬        not sign	 	¬
    173	*	        	*        soft hyphen	 	*
    174	®	        	®        registered sign	 	®
    175	Ż	        	¯        macron	 	¯
    176	°	        	°        degree sign	 	°
    177	±	        	±        plus-minus sign	 	±
    178	˛	        	²        superscript two	 	²
    179	ł	        	³        superscript three	 	³
    180	´	        	´        acute accent	 	´
    181	µ	        	µ        micro sign	 	µ
    182	¶	        	¶        pilcrow sign	 	¶
    183	•	        	•        middle dot	 	•
    184	¸	        	¸        cedilla	 	¸
    185	ą	        	¹        superscript one	 	¹
    186	ş	        	º        masculine ordinal indicator	 	º
    187	»	        	»        right-pointing double angle quotation mark	 	»
    188	Ľ	        	¼        vulgar fraction one quarter	 	¼
    189	˝	        	½        vulgar fraction one half	 	½
    190	ľ	        	¾        vulgar fraction three quarters	 	¾
    191	ż	        	¿        inverted question mark	 	¿
    192	Ŕ	        	À        Latin capital letter A with grave	 	À
    193	Á	        	Á        Latin capital letter A with acute	 	Á
    194	Â	        	Â        Latin capital letter A with circumflex	 	Â
    195	Ă	        	Ã        Latin capital letter A with tilde	 	Ã
    196	Ä	        	Ä        Latin capital letter A with diaeresis	 	Ä
    197	Ĺ	        	Å        Latin capital letter A with ring above	 	Å
    198	Ć	        	Æ        Latin capital letter AE	 	Æ
    199	Ç	        	Ç        Latin capital letter C with cedilla	 	Ç
    200	Č	        	È        Latin capital letter E with grave	 	È
    201	É	        	É        Latin capital letter E with acute	 	É
    202	Ę	        	Ê        Latin capital letter E with circumflex	 	Ê
    203	Ë	        	Ë        Latin capital letter E with diaeresis	 	Ë
    204	Ě	        	Ì        Latin capital letter I with grave	 	Ì
    205	Í	        	Í        Latin capital letter I with acute	 	Í
    206	Î	        	Î        Latin capital letter I with circumflex	 	Î
    207	Ď	        	Ï        Latin capital letter I with diaeresis	 	Ï
    208	Đ	        	Ð        Latin capital letter Eth	 	Ð
    209	Ń	        	Ñ        Latin capital letter N with tilde	 	Ñ
    210	Ň	        	Ò        Latin capital letter O with grave	 	Ò
    211	Ó	        	Ó        Latin capital letter O with acute	 	Ó
    212	Ô	        	Ô        Latin capital letter O with circumflex	 	Ô
    213	Ő	        	Õ        Latin capital letter O with tilde	 	Õ
    214	Ö	        	Ö        Latin capital letter O with diaeresis	 	Ö
    215	×	        	×        multiplication sign	 	×
    216	Ř	        	Ø        Latin capital letter O with stroke	 	Ø
    217	Ů	        	Ù        Latin capital letter U with grave	 	Ù
    218	Ú	        	Ú        Latin capital letter U with acute	 	Ú
    219	Ű	        	Û        Latin capital letter U with circumflex	 	Û
    220	Ü	        	Ü        Latin capital letter U with diaeresis	 	Ü
    221	Ý	        	Ý        Latin capital letter Y with acute	 	Ý
    222	Ţ	        	Þ        Latin capital letter Thorn	 	Þ
    223	ß	        	ß        Latin small letter sharp s	 	ß
    224	ŕ	        	à        Latin small letter a with grave	 	à
    225	á	        	á        Latin small letter a with acute	 	á
    226	â	        	â        Latin small letter a with circumflex	 	â
    227	ă	        	ã        Latin small letter a with tilde	 	ã
    228	ä	        	ä        Latin small letter a with diaeresis	 	ä
    229	ĺ	        	å        Latin small letter a with ring above	 	å
    230	ć	        	æ        Latin small letter ae	 	æ
    231	ç	        	ç        Latin small letter c with cedilla	 	ç
    232	č	        	è        Latin small letter e with grave	 	è
    233	é	        	é        Latin small letter e with acute	 	é
    234	ę	        	ê        Latin small letter e with circumflex	 	ê
    235	ë	        	ë        Latin small letter e with diaeresis	 	ë
    236	ě	        	ì        Latin small letter i with grave	 	ì
    237	í	        	í        Latin small letter i with acute	 	í
    238	î	        	î        Latin small letter i with circumflex	 	î
    239	ď	        	ï        Latin small letter i with diaeresis	 	ï
    240	đ	        	ð        Latin small letter eth	 	ð
    241	ń	        	ñ        Latin small letter n with tilde	 	ñ
    242	ň	        	ò        Latin small letter o with grave	 	ò
    243	ó	        	ó        Latin small letter o with acute	 	ó
    244	ô	        	ô        Latin small letter o with circumflex	 	ô
    245	ő	        	õ        Latin small letter o with tilde	 	õ
    246	ö	        	ö        Latin small letter o with diaeresis	 	ö
    247	÷	        	÷        division sign	 	÷
    248	ř	        	ø        Latin small letter o with stroke	 	ø
    249	ů	        	ù        Latin small letter u with grave	 	ù
    250	ú	        	ú        Latin small letter u with acute	 	ú
    251	ű	        	û        Latin small letter with circumflex	 	û
    252	ü	        	ü        Latin small letter u with diaeresis	 	ü
    253	ý	        	ý        Latin small letter y with acute	 	ý
    254	ţ	        	þ        Latin small letter thorn	 	þ
    255	˙	        	ÿ        Latin small letter y with diaeresis	 	ÿ
    ' **Note: regarding the two columns with MS "ANSI lists" 0-127 and128-255( Columns G and H in uploaded file)
    ' Microsoft Character list 0-127, - is usually the same as ASCII
    ' Microsoft Character list 128-255, - Windows default. However, values in the ANSI character set above 127 are determined by the code page specific to your operating system. (Windows-1252 or CP-1252 (Windows code page 1252) is a legacy single-byte character encoding that is used by default (as the "ANSI code pageage") Microsoft Windows





    Share ‘WunucodeANSI.xlsm’ https://app.box.com/s/20erozqcjs2ljphkiycvbtah08y85fy9
    Attached Files Attached Files
    Last edited by DocAElstein; 12-26-2024 at 06:45 PM.

Similar Threads

  1. Some Date Notes and Tests
    By DocAElstein in forum Test Area
    Replies: 5
    Last Post: 03-26-2025, 02:56 AM
  2. Replies: 116
    Last Post: 02-23-2025, 12:13 AM
  3. Replies: 21
    Last Post: 12-15-2024, 07:13 PM
  4. Replies: 42
    Last Post: 05-29-2023, 01:19 PM
  5. Replies: 11
    Last Post: 10-13-2013, 10:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •