I am writing on a script that extracts and saves JPEG-attachements from emails and passes them to imagemagick. However, I am living in Germany and special characters in email text/subject as "ö", "ä", "ü" and "ß" are pretty common.
I am extracting the subject with formail:
SUBJECT=$(formail -zxSubject: <"$file")
and that results in:
("Meine Güte") or even worse
I try to use part of the subject as a filename and as imagemagick text annotation, which obviously doesn't work.
How do I convert this UTF-8 text to text with special characters in bash?
Thanks in advance! Markus