I normally use \usepackage[utf8]{inputenc}
for my latex document but on this site i saw a lot of code with \usepackage[utf8x]{inputenc}
.
What are the differences between the 2 options ?
Is there one of the option obsolete and which one should I use ?
Best Answer
The simple answer is that
utf8x
is to be avoided if possible. It loads theucs
package, which for a long time was unmaintained (although there is now a new maintainer) and breaks various other things.See egreg's answer to this question as well, which outlines how to get extra characters using the
[utf8]
option ofinputenc
.Generally, however, the best way to deal with Unicode source (especially with non-latin scripts) is really XeLaTeX or LuaLaTeX.
There's an extended discussion of this here: Encoding remarks. See especially the comments by Philipp Lehman and Philipp Stephani.