local p = {}
-- tabella di conversione
local accenti_={
	[' ']='_',
	['À']='%C0',
	['Á']='%C1',
	['Â']='%C2',
	['Ã']='%C3',
	['Ä']='%C4',
	['Å']='%C5',
	['Æ']='%C6',
	['Ç']='%C7',
	['È']='%C8',
	['É']='%C9',
	['Ê']='%CA',
	['Ë']='%CB',
	['Ì']='%CC',
	['Í']='%CD',
	['Î']='%CE',
	['Ï']='%CF',
	['Ð']='%D0',
	['Ñ']='%D1',
	['Ò']='%D2',
	['Ó']='%D3',
	['Ô']='%D4',
	['Õ']='%D5',
	['Ö']='%D6',
	['Ø']='%D8',
	['Ù']='%D9',
	['Ú']='%DA',
	['Û']='%DB',
	['Ü']='%DC',
	['Ý']='%DD',
	['Þ']='%DE',
	['ß']='%DF',
	['à']='%E0',
	['á']='%E1',
	['â']='%E2',
	['ã']='%E3',
	['ä']='%E4',
	['å']='%E5',
	['æ']='%E6',
	['ç']='%E7',
	['è']='%E8',
	['é']='%E9',
	['ê']='%EA',
	['ë']='%EB',
	['ì']='%EC',
	['í']='%ED',
	['î']='%EE',
	['ï']='%EF',
	['ð']='%F0',
	['ñ']='%F1',
	['ò']='%F2',
	['ó']='%F3',
	['ô']='%F4',
	['õ']='%F5',
	['ö']='%F6',
	['ø']='%F8',
	['ù']='%F9',
	['ú']='%FA',
	['û']='%FB',
	['ü']='%FC',
	['ý']='%FD',
	['þ']='%FE',
	['ÿ']='%FF',
	};

function p.accenti(arg)
	if type(arg) == "table" then
	arg = arg.args[1]
	end
	return (mw.ustring.gsub(arg, '.', accenti_))
end
return p