UTF8

Addons
3,161 Downloads Last Updated: Aug 22, 2014 Game Version: API12

Provides UTF-8 aware string functions implemented in pure lua.

This is a library and therefore not meant to be installed as an addon.

To use it in your own addon, just add the file utf8.lua to your .toc file and in your addons .lua  file reference the library package as follows:

local utf8 = Apollo.GetPackage("Jos_eu:UTF8-1.1").tPackage
 
Usage example:
 
local utf8 = Apollo.GetPackage("Jos_eu:UTF8-1.1").tPackage
local str = "Schönes Wetter!"
Print(utf8.len(str)) -- prints 15, with string.len(str) it would print 16
Print(utf8.sub(str, 1, 7)) -- Schönes
Print(utf8.reverse(str))   -- !retteW senöhcS
Print(utf8.upper(str))     -- SCHÖNES WETTER!
Print(utf8.lower(str))     -- schönes wetter!
 
This is a WildStar version of the WoW port UTF8 of Kyle Smith's "utf8.lua".

Comments

Posts Quoted: