Different UTF-8 character output with chr()

I set a Textfield text whith this Code:

TextField1.Text = "¶" + "      " + chr(&hc2b6)

The Output of the Textfield is:
Why is the Char, set with CHR different?
The UTF-8 coding table say:

How can i add a Unicode Character with hexcode?

In the doc they indicate that we can set an enconding like:
CR = Encodings.ASCII.Chr(13)
Set the encoding you need (UTF8 or etc.).

1 Like

C2 B6 represents to the bytes used to UTF-8 encode the Unicode code point that represents “¶”. That code point is simply `B6’ and you can represent that in any of these ways:

TextField1.Text = "¶"
TextField1.Text = Chr( &hB6 )
TextField1.Text = &uB6
1 Like

Oh, I must have missed that! Thanks for the hint!

My mistake! I’m dealing with encoding for the first time. And every beginning is difficult. Thanks!

One needs to distinguish between the Unicode code point value, which is simply one entry in a long list of such values, and how the character the code point is assigned to is represented on disk. This latter is the encoding and there are several flavours - UTF8 is one. The Wikipedia article is useful here.