latexdiff in the pit: character encoding issues

Recently wrote an article with latex, to use the revised model, then generate the command using latexdiff revision pdf. This was originally a very simple and convenient way, but hidden character encoding issues, for the first time with a problem you may encounter unexpected, annoying people, for example, generated out of the .tex document, not UTF-8 encoding, and is UTF-16, which leads to latex does not compile (I am using the Windows10 + TeXLive 2019 + VS CODE). By converting it into a notepad UTF-8 encoding, there will be strange character, as follows:

Package inputenc: Unicode character 贸 (U+8D38)
(inputenc) not set up for use with LaTeX.
Package inputenc: Unicode character 铆 (U+94C6)
(inputenc) not set up for use with LaTeX.
Package inputenc: Unicode character 啪 (U+556A)
(inputenc) not set up for use with LaTeX.
Package inputenc: Unicode character 谩 (U+8C29)
(inputenc) not set up for use with LaTeX.
Package inputenc: Unicode character 酶 (U+9176)
(inputenc) not set up for use with LaTeX.
Package inputenc: Unicode character 氓 (U+6C13)
(inputenc) not set up for use with LaTeX.
Package inputenc: Unicode character 鈥 (U+9225)
(inputenc) not set up for use with LaTeX.
Package inputenc: Unicode character 擳 (U+64F3)
(inputenc) not set up for use with LaTeX.
Package inputenc: Unicode character 枚 (U+679A)
(inputenc) not set up for use with LaTeX.
 
After careful examination, because these are the references contained the names of weird letters Greek letters, Nordic letters, etc., and special character combinations, such as "-T", "r's" and so on. Because latex text is very long, the error can not be found by the naked eye, but will not be garbled VS CODE is marked red, but you can find wrong with the following methods:
1, after the .tex file into UTF-8 encoding, directly translated, allowed error;
2, see the error of VS CODE, which will write down all the garbage, it will come out one by one copy, as shown above, and then one by one to find the .tex file until all the error is gone;
 
In addition to garbage and special characters, modify the image of seemingly nowhere, the compiler is not passed, directly remove like, so rogue.

Guess you like

Origin www.cnblogs.com/lzhu/p/11299414.html