solve copy/paste encoding problems?
I hear that you can copy paste text from MS word and send an email or post something and there will be an encoding problem.
I also heard from someone else its only a problem with webpages that cant handle unicode. Is it possible to have a doc that cannot be copy/paste to a webbrowsers/apps properly? (assuming its all text and only has alignment problems). What can i have in a document that triggers some problems easily fixable by adding more code (such as unicode support).
sidenote my webapps are written in C开发者_开发问答# asp.net
It is very much possible.
When you copy/paste from Word, you can end up in all kinds of ugly situations. Paste it into a rich text editor, and you'll probably end up having some crazy html hidden away, not seen until you view the result. We have been wrestling with this problem a long time at work, and the easiest solution to get right encoding and no extra:
- Copy your text
- Paste it into notepad/notepad++
- Copy the text from there
- Paste it!
Hope that helps!
well this is a good segment since i wasted 3 hours of my employer's time until i figured out the root cause of the problem.
scenario: copy text from a PDF file viewer and pasting it as a translation string in a Drupal site. Then write a CSV exporter in PHP and wonder WHY the text is mangled.
Eventualy I had to redo the translation to remove all the "fancy" quotes, accents and wathcamabobers from the dud spud text.
the end face
精彩评论