I'm writing a bash script that needs to parse html that includes special characters such as @!'ó
. Currently I have the entire script running and it ignores or trips on these queries because they're returned from the server as decimal unicode like this: '
. I've figured out how to parse and convert to hexadecimal and load these into python to convert them back to their symbols and I am wondering if bash can do this final conversion natively. Simple example in python:
print ur"\u0032" ur"\u0033" ur"\u0040"
prints out
23@
Can I achieve the same result in Bash? I've looked into iconv but I don't think it can do what I want, or more probably I just don't know how.
Here's some relevant information:
Hex to UTF conversion in Python
And here are some examples of expected input-output.
Ludwig van Beethoven - 5th Symphony and 6th Symphony ''Pastoral'' - Boston Symphony Orchestra - Charles Munch
Ludwig van Beethoven - 5th Symphony and 6th Symphony ''Pastoral'' - Boston Symphony Orchestra - Charles Munch
АлисА (Alisa) - Мы вместе. ХХ лет (My vmeste XX let)
АлисА (Alisa) - Мы вместе. ХХ лет (My vmeste XX let)