unction convert_utf8_ascii_character( _str, _ascii )
local found;
local tmp = database.utf8_ascii[_ascii];
_str, found = string.gsub(_str, string.char(tmp.utf8_1, tmp.utf8_2), string.char(tmp.ascii) );
return _str, found;
end
function convert_utf8_ascii( _str )
local found, found_all;
found_all = 0;
for i,v in pairs(database.utf8_ascii) do
_str, found = convert_utf8_ascii_character( _str, v.ascii ); -- replace special characters
found_all = found_all + found; -- count replacements
end
if( found_all > 0) then
return _str, true;
else
return _str, false;
end
end
master121 wrote:function convert_utf8_ascii_character( _str, _ascii ) and function convert_utf8_ascii( _str ) are in there.
I think d003232 gave me the functions.
In the latest SVN, the function for conversion of umlauts was renamed to