Additional NewtonScript Features

Unicode

Newton is an international machine, so it uses the Unicode character encoding. In this international character-encoding standard, each character is represented with two bytes. The two-byte values from 1 to 127 represent standard ascii values. For example, the letter 'A' in Unicode is represented with a high byte of 0 and a low byte of the ascii value of A.

Beyond the 7-bit horizon, you will need to specify your characters using the Unicode designation:

$\uHHHH
where HHHH is the four character hexadecimal value that specifies a particular Unicode character. The $\u must preface the character.

"\uHHHH\u"
Within a string, \u enters Unicode mode. The four hexadecimal characters specify a particular Unicode character. \u exits Unicode mode, as well.

For example, to specify the seven-character string "abc...def" (containing an embedded '...' character, use:

"abc\u2026\udef"

An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.

Last modified: 1 DEC 1996