print message to console in correct encoding. Fixes #7652