After copying text from PDF-Viewer it sometimes happens that fi are copied as one character. When trying to save this document, there is the error message "The text contains characters that cannot be saved in the current encoding."

If you copy a long text it is hard to spot however, where these characters are. Is there a simple solution to highlight them or to convert the encoding?

I use the program TestComplete but any other program is appreciated in order to fulfill the task.

  • highlight them .. in what PROGRAM? – akira Jan 19 '12 at 13:48

"fi" is a ligature. If you paste it into a program such as Notepad, you can save it by specifying the encoding as UTF-8 in the File, Save As dialog. Other programs will have a similar capability to save text in UTF-8 encoding.

If you want to decompose "fi" to "f" and "i". You'd need some software that does that. Maybe iconv or recode?

 iconv -t ASCII//translit

Smartbear Software say

TestComplete supports Unicode … Script units included in the test project must be saved in either UTF-8 or UTF-16 encoding. You can select the encoding using the Character encoding property of your project.

  • same will go with “fl” or “ffi”, “ffl”. Sometimes “ct”, “st” in French. – Benoit Jan 19 '12 at 15:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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