I have this problem with a PDF I am trying to copy the text from... I have this text in a pdf and I need to insert in into a HTML page, the problem is that when I copy the text some of the letters(the one with diacritics(like: Ț or Ș) are being left out, the words containing them are not correct anymore...

I found out that this is because the PDF is using ASNI font encoding while the browser uses UNICODE ... how can I change the ANSI encoding in the PDF to transform it to UNICODE ?

  • 2
    please do not move this question to a code stack exchange... because as a designer you do face this problem sometimes and there is nothing out there to help you... Jul 23, 2012 at 1:31
  • How are you extracting your text? Is it e.g. from Adobe Reader/Acrobat via text select and copy?
    – thebodzio
    Jul 23, 2012 at 21:37
  • yes, is there another way ? Jul 24, 2012 at 2:06
  • In fact there is… and a couple of them at that. One would be to use Acrobat "Export->Text->…" (it is present for sure in version 9; there are some export settings available, like resultant file encoding). There are also a couple of tools to extract text from PDF file. Some of them command line tools like pdf2html, pdf2txt or something like that. But even then, getting text from PDF can be problematic.
    – thebodzio
    Jul 24, 2012 at 12:37
  • here is a sample of my text: pas în crearea unei pie􀄠e unice, denumit􀄃 apoi Comunitatea Economic􀄃 European􀄃), Declara􀄠ia Solemn􀄃 privind Aug 12, 2012 at 17:47

1 Answer 1


If the problem is indeed what you describe, Notepad++ should do what you want, it's free. Create a new document in Notepad++, make sure 'Encode in ANSI' is selected in the Encoding menu, paste the text there, then choose 'Convert to UTF-8 without BOM' in the Encoding menu.

You can also try using Decoder, a free online tool for fixing encoding problems. It's in Russian, but usage is pretty straightforward - paste mangled text into the text box and hit the button that says "Расшифровать".

  • tried it...didn't work... although all means of logic say it should... PDF has ANSI encoding...on most fonts... tried converting to UTF-8 ... didn't work... then I tried all the semi-"random" combinations of conversion I could think of...still didn't ... i have to try again when I'll get enough patience for this project again... right now I'm hoping a magic button will fall from the sealing and everything will be ok after I press it :) Jul 24, 2012 at 2:09
  • I've added another option to the answer, try it. Personally, I think the problem lies somewhere else. Are you sure the target HTML file has the correct encoding set up?
    – kotekzot
    Jul 24, 2012 at 5:50
  • Расшифровать might do it :)) . Ill try next time I have to update that page, its a page that gets a new post 2 times a month, and in the html page you get to see a preview of what a downloadable PDF contains, usually it worked fine... just the last couple of months this issue with letters that have diacritics occured, not sure if I changed something on my laptop or the client changed something to the way it saves the PDF's .. Anyhow, thanks for the "Decoder" , I'll come back and let you know if it worked for me. Aug 12, 2012 at 17:40
  • 1
    hmz.. didn't really work, instead it made all my text russian ... Aug 12, 2012 at 17:42
  • so no :( doesn't work... my text is in romanian, not russian, I guess it might work for russian copy maybe... have no ideea Aug 12, 2012 at 17:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.