Home  Contents

UTF8 functions

String Core4 Lua Commands

SYNOPSIS

  1. result = string.fromutf8(s , codepage)
  2. result = string.toutf8(s , codepage)

DESCRIPTION

These functions allow conversion between UTF8 and a specific 8-bit encoding. While string.fromutf8() converts UTF8 to a codepage encoding, the other function string.toutf8() converts a codepage encoding to UTF8.

This is the list of supported codepages:

cp437 The character set of the original IBM PC
cp850 Western european character set used by DOS, derived from cp437
cp858 Same as cp850, but with € Symbol added.
windows-1252 Codepage used by Windows for english and most western european languages.
iso8859-1 ISO standard encoding for western european languages.
iso8859-15 Another ISO standard encoding for western european languages. Similar to iso8859-1, but includes the Euro character and a few more accented letters.
Note: Click on the codepage name to see the wikipedia article about it.

SEE ALSO