I use a package to right Latex code on Latex, but when I used special caracters I got this error

Package inputenc Error: Unicode char ...

this is a sample of code

    Ceci est un nom composé en fin de ligne du mathématicien Albert~EINSTEIN.

like you see, the phrase on the listing bloc contain special caracters, I tried utf8x instead of utf8, it doesn't work, so how can I solve this, please ?


Listings doesn't work with utf8. Add this option to \lstset:


and similarly for other non-ascii characters (separate all such specifications with space).

  • it works for é, but how can I found the others symbols like è, ê ... – Hind Dev Aug 22 '16 at 14:57
  • 1
    Add the prehistoric code for accented letters: {è}{{`e}}1 {ê}{{\ˆe}}1 {à}{{`a}}1 , &c (don't forget accented capital letters). – Bernard Aug 22 '16 at 15:02

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.