Results 1 to 10 of 570

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

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    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.

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
  •