# Codification when copy/paste from PDF

**URL:** <https://forum.kirupa.com/t/codification-when-copy-paste-from-pdf/325336>\
**Category:** programming\
**Created:** [October 10, 2011, 9:39am UTC](https://forum.kirupa.com/t/codification-when-copy-paste-from-pdf/325336 "2011-10-10T09:39:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ruiganga](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ruiganga/32/3679_2.png) [@ruiganga](https://forum.kirupa.com/u/ruiganga)\
**Post date:** [October 10, 2011, 9:39am UTC](https://forum.kirupa.com/t/codification-when-copy-paste-from-pdf/325336/1 "2011-10-10T09:39:37Z")

</div>

Hi!

I have a very weird error with codification.

Everytime I try to copy and paste a text from a PDF document the result is ? (question marks) instead of special ccaracters.

For example:

instead of “cão” I got “c?o”

If I type the word by hand the codification is good ans show what is correct. Only when I copy a text from a PDF file (for example this: [http://www.gave.min-edu.pt/np3content/?newsId=81&fileName=biologia\_e\_geologia702\_pcf1\_07\_v1.pdf](http://www.gave.min-edu.pt/np3content/?newsId=81&fileName=biologia_e_geologia702_pcf1_07_v1.pdf)) i got ? instead of the ã or é or ç or other special characters.

Since the form save the data do a database I try to see what satys there:

when the letter “é” is copyed from PDF it shows in the DB “eÌ”

when I type the letter “é” it shows in the DB “Ã©”

Why this difference? How can I avoid this from happening?

Why when this word is loaded into a textarea is showind correctly but when I put it inside a div it is not?

Thanks for any help 🙂
