Just like this question, I need to convert html entities (e.g. &) to UTF-8 (&) while ignoring other UTF-8 characters. The difference is that in my case, I need to do this via the bash command line.
I can use a tool like recode and run echo '&' | recode html..utf-8 which converts over to & just fine, however with UTF-8 characters in the string, like in
echo 'Arabic & ٱلْعَرَبِيَّة' | recode html..utf-8
I get:
Arabic & Ù±ÙÙØ¹ÙØ±ÙØ¨ÙÙÙÙØ©
which, naturally, is not what I need. It should look like this at the end:
Arabic & ٱلْعَرَبِيَّة
Is there a way to do this without a bunch of messy and seemingly endless regex? Thanks