The goal is really simple. Receiving a string as input, parse all the HTML entities that correspond to the following characters (including their uppercase variants):
- Each entity starts with
&and ends with
- The first character after the
&will be the modified character (letter case is important!)
- The remaining characters refer to the name of the accent to use (
uml). The accent name MUST be in lowercase! *
- Any HTML entity that produces a character that isn't on that list, or that is invalid, should be left untouched (E.g.:
- Numeric entities should be ignored, since they don't fit in the rules above
This change was introduced as of 18-02-2016. All the existing answers that accept HTML entities with uppercase accent names are valid. Any future answer must follow this rule.
á //á Téhèh //Téhèh an & //an &
The output can be in ISO-8859-X (1-15), windows-1252 or UTF-8/16/32.
You can pick one and only one of the valid encodings and use it for any output. You can safely assume that the input will be in ASCII.
Any of the following is a valid output for
á(ISO-8859-1/15 or windows-1252, equivalent to
Ã¡(UTF-8, equivalent to
aÌ(UTF-8, equivalent to
- Any combination of diacritics, without using HTML entities.
The output has to be visually similar, when rendered/displayed, to the characters on the list.
Remember, all the standard loopholes and built-ins * are disallowed. Since this is code-golf, the shortest answer wins.
* This change was made due to the great disapproval of bonuses and penalities, and at the time of writting, doesn't invalidate any answer