Add find_charset helper and use where is needed.
Handle non-ascii headers. Closes #5021.
Add changes file for #5021.
Merge remote-tracking branch 'refs/remotes/ivan/bug/5021_handle-non-ascii-headers' into develop