Results 1 to 10 of 45

Thread: Character and ASCII, how they are supposed to work

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #40
    Join Date
    Feb 2009
    The Netherlands

    Default Re: Character and ASCII, how they are supposed to work

    Quote Originally Posted by Marco View Post
    Thanks Samuel
    But I got that decimal combined value from the link from help file page for ascii...
    So my confusion is even bigger now...
    I'll take another stab at trying to explain this, let me know if it makes it worse or better..

    The help is referring to On it lists all the Unicode code points. The ASCII and Character functions work with these Unicode code points. When you look at a specific character at (like you'll see that the code point is displayed as a hex value (1F498 = 128152), it shows the decimal value at the HTML entity (this is the same as what you'll see coming out of the Ascii function).

    So code points are the unique Unicode symbols. In most cases characters are represented by single code point (with the exception of composite characters). The encoding specifies how these code points are stored (UTF-8 / UTF-16 / UTF-32). Encodings sometimes break up code points into smaller code units (1 byte each for UTF-8, 2 bytes each for UTF-16).

    The Character function can be used to convert a code point (passed in as an integer) into its UTF-8 string representation. The Ascii function does the exact opposite and converts the first code point of the string passed into it into an integer representing the code point.

    This is different than the UCharToString, UCharArrayToString and StringToUCharArray do, these functions do not perform conversions. So each UChar in the array represents a single UTF-8 code unit.
    Last edited by Harm Wibier; 7-Apr-2021 at 02:58 AM.
    Harm Wibier
    Data Access Europe B.V.

Posting Permissions

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