next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc :: utf8

utf8 -- encode and decode unicode utf-8-encoded strings

Description

Synopsis

  • Usage:
    utf8 x
  • Inputs:
    • x, a list, a list of small natural numbers to serve as character codes
  • Outputs:
    • a string, a string obtained by encoding the character codes in x according to the utf-8 encoding standard
i1 : s = utf8 {119, 111, 51, 32, 25105}

o1 = wo3 我

Synopsis

  • Usage:
    utf8 s
  • Inputs:
  • Outputs:
    • a list, a list of the integer codes obtained by decoding the string s according to the utf-8 encoding standard
i2 : utf8 s

o2 = {119, 111, 51, 32, 25105}

o2 : List

The two operations described above are inverse to each other.

See also