Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This function can encode a string into UTF-8. UTF-8 is a variable-length character encoding for Unicode. It can represent any character in the Unicode standard, yet is backwards compatible with ASCII.

Example:

Code Block
javascript
javascript

var encoded = pui.UTF8.encode(s);