In XSLT / XPath 1.0, if you want to replace these accented characters with a failed copy, you can use the translate() function.
But this assumes that your "accented UNICODE characters" are not composed of Unicode characters. If so, you will need to use the XPath 2.0 function normalize-unicode() .
And if the real goal is to have a valid URI, you should use encode-for-uri()
Update : Examples
translate('gri_gonéwiththèw00mitc','áàâäéèêëíìîïóòôöúùûü','aaaaeeeeiiiioooouuuu')
Result: gri_gonewiththew00mitc
encode-for-uri('gri_gonéwiththèw00mitc')
Result: gri_gon%C3%A9withth%C3%A8w00mitc
The correct expression is given by @biziclop's suggestion:
replace(normalize-unicode('gri_gonéwiththèw00mitc','NFKD'),'\P{ASCII}','')
Result: gri_gonewiththew00mitc
Note In XPath 2.0, the correct negation of a character class is \P
user357812
source share