Fixes #2787. WYSIWYG would strip characters when decoding on some systems