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
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

string.utf8at, string.utf8bidi, string.utf8char, string.utf8fwd, string.utf8len, string.utf8lower, string.utf8rev, string.utf8reverse, string.utf8sub, string.utf8upper