mrtonyb
mrtonyb

Reputation: 615

Strange characters when pasted from Word in our Java app

We have a Java application that's experiencing character encoding problems when pasting from Word into one of its text fields. This is only happening in IE8, and I assume previous IE versions. The replaceAll Java filters I initially added to fix this problem works on all of the latest browsers. IE8 is the problem.

An example of the problem:

“double quotes” is pasted from Word into a text field. After saving the entry, the quotation marks are converted into the characters below. After each new save, the characters change and the number of them increase.

First save: âœdouble quotesâ

Second save: âÂÂœdouble quotesâÂÂ

Third save: âÂÂœdouble quotesâÂÂÂÂ

Fourth save: âÂÂÂœdouble quotesâÂÂÂÂÂÂ

So quotation marks and apostrophes are our main concern. We'd also like to have bullet lists work well in this text field.

Upvotes: 4

Views: 468

Answers (1)

Alex Fischer
Alex Fischer

Reputation: 545

Microsoft Word does not use standard double quotes ("), they use the double quotes that change their 'direction' and look like this: “ ”. The formatted duble quotes are very different from normal double quotes, and will not appear the same when put in a normal text box.

Upvotes: 2

Related Questions