Html – Copying wingdings (etc) from word documents to html text fields

htmlms-wordwingdings

When I write out some text (standard English, no fancy characters) in Word using Windgings as a font, copying the text and pasting into an html textfield results in the OS's "I don't know what character this is" characters (little squares on Windows).

It seems that changing the font (what should be a display-only property) is preventing the text from being pasted correctly into the input field.

Why does it not paste the text directly?
Is there anything I can do to stop the 'little squares' problem?

Best Answer

There are 2 problems here:

  1. The standard text field on a web page only accepts/displays plain text. When you add "Wingdings" characters to a Word document, you're actually changing the font for that character to "Wingdings." This is possible because most modern text editors use advanced document formats like RTF, ODF, one of the various Word formats, etc.

    So when you copy and paste a selection of text from Word to your browser, all the text formatting (including the font information) is lost. The pasted text will simply be shown in the font & style of that particular text field.

  2. Most documents on the internet are encoded using some form of Unicode encoding, typically UTF-8. Since Wingdings isn't mapped to Unicode, this prevents it from being displayed properly on web pages.