Michael
Michael

Reputation: 2598

Pasting Word text into utf-8 HTML file

Background: I create a lot of broadcast e-mails at my job, and the content for these e-mails are usually sent to me in a Word document. I hand-code my e-mails with an XHTML 1.0 Transitional doctype and UTF-8 character set.

My question: What's the fastest way to convert text copied from MS Word to UTF-8 so I can paste it into my XHTML files?

For now... I created my own character encoding converter in Coldfusion, but it's very rudimentary and handles "problem characters" only if I specify them and only one at a time. Example:

function HTMLEncode(string) {
   string = Replace(string, '&', '&', 'ALL');
   string = Replace(string, '©', '©', 'ALL');
   string = Replace(string, '—', '-', 'ALL');
   ...

There has to be a better/simpler/faster way. Any suggestions?

Upvotes: 0

Views: 1809

Answers (1)

hbhakhra
hbhakhra

Reputation: 4236

Try notepad++. There is a plugin called TextFX that might do this for you. If not, there are a lot of plugins available for it so chances are you might find one.

Here is the link for notepad++ plugins

Upvotes: 1

Related Questions