Chr(13) Encoding

How do I assign Chr(13) to a Var with the right encoding?
The following is wrong and I can’t seem to get the syntax correct. Part 2 is there an encoding which is preferred Mac/Win compatibility?

var CR as text = xojo.core.TextEncoding.UTF8(13)

use &u0D

Out of curiosity what would have been correct the longways if I wanted to do other characters?

I’m not sure what you mean by “longways”, but to specify other characters using hexadecimal or Unicode character codes, you can find the codes from a number of websites like http://ascii-table.com/character-tables.php. In your ASCII example, see what decimal 13 corresponds to?

I hope that helps to answer your question.

Also see Language Literals for &h and &u.

This is always a helpful link too The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)